SQL Server can be administered programmatically using system stored procedures, but Distributed Management Objects (DMO) offer a more modern, object-oriented alternative. This article introduces SQL-DMO in SQL Server 7.0 and SQL Server 2000 and describes the SQL-DMO object model, then focuses primarily on the Databases tree and the JobServer tree of the object model. The sample code and the article show how to use various objects such as the Registry object, the Configuration object, and the Database object to automate common administration tasks such as programmatically retrieving configuration settings, creating new databases, applying T-SQL scripts, and creating and scheduling backups.
MSDN Magazine May 2001
View Complete Post