Chapter 9. SQL Server Management Objects (SMO)

SQL Server Management Objects (SMO) is a collection of namespaces introduced in SQL Server 2005 for programming all aspects of SQL Server 2005 management. SMO supersedes SQL Server Distributed Management Objects (SQL-DMO). Besides extending SQL-DMO functionality, SMO is easier to use. SMO adds functionality to support new SQL Server 2005 features, in addition to providing all SQL-DMO functionality.

SMO uses SQL-DMO terminology where possible to facilitate the migration. However, some DMO properties have been moved or renamed in the transition. For more information, see the Microsoft SQL Server 2005 Books Online section “SMO Mapping to DMO.”

There is no way to upgrade a SQL-DMO application to SMO—the application must be rewritten. SMO applications can interface with both SMO and SQL-DMO within the same process.

SMO is compatible with SQL Server 2000 and SQL Server 7.0. This allows you to use SMO to manage environments with a mix of different SQL Server versions. You cannot use SMO to manage a database with compatibility level 60 (SQL Server version 6.0) or 65 (SQL Server version 6.5).

SMO uses the SQL Server data provider (System.Data.SqlClient) to communicate with SQL Server instances. SMO clients must have SQL Server Native Client installed. SQL Server Native Client ships with both SQL Server 2005 and .NET Framework 2.0 and is described in more detail in Chapter 6.

SMO clients require one of the following operating systems: Windows NT 4.0 ...

Get Programming SQL Server 2005 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.