SQL-DMO
SQL-DMO Objects and Existing SQL Server Components
When a SQL-DMO object references an existing Microsoft® SQL Server™ component, you can use the object to configure or tune the instance of SQL Server.
Applications do not generally alter the properties of SQL-DMO objects that reference existing SQL Server components. For these objects, properties often provide identifying data or data that is the source for application logic. SQL-DMO object methods then become a much more important tool for database administration. For example:
- The UpdateStatisticsWith method of a Column, Index, or Table object forces an update of data distribution statistics, assisting SQL Server query optimization.
- The CheckTables method of a Database object performs data file integrity validation on the tables in a database.
- The AddNotification method of an Alert object configures a SQL Server Agent alert with a new operator to notify on an event condition.
- The SQLRestore method of a Restore object restores log or data file data after recovery from hardware failure.
Some SQL-DMO objects support the Remove method directly. Remove drops or deletes the referenced SQL Server component and removes the object from its containing collection.