Object Methods

SQL-DMO

SQL-DMO

Object Methods

Many SQL-DMO object methods act upon a Microsoft® SQL Server™ component, modifying an instance of SQL Server in some fashion. For example:

  • The BindToColumn method of a Default object binds a SQL Server default to the column identified in the method. Selecting the referencing Column object displays the bound default by name in the Default property.

  • The ResetOccurrenceCount method of the Alert object resets the occurrence count start date and time to the current date and time and sets count of alert notifications attempted after that time to zero.

Some SQL-DMO object methods use a SQL Server component for source data, providing usable output for other SQL Server management tasks. For example:

  • The Script method of a MergeArticle object generates a Transact-SQL script that can be used to define the referenced merge replication article on any similarly configured instance of SQL Server.

  • The ScriptDestinationObject method of a MergeArticle object generates a Transact-SQL script that can be used to create the referenced merge replication article's source table on any similarly configured instance of SQL Server.

SQL-DMO methods also perform basic administration tasks. For example:

  • The Start method of the JobServer object attempts to start the SQLServerAgent service on the server referenced by the SQLServer object from which the JobServer object was selected.

  • The SQLBackup method of the Backup object is used to back up SQL Server database data and log files.