Section 9.1. SMO Object Model


9.1. SMO Object Model

The SMO object model contains two types of classes:


Instance classes

Form a hierarchy that matches the database server object hierarchy. The top object is a SQL Server instance represented by the Server object. Under this object is a hierarchy of instance objects, including databases, tables, columns, indexes, and stored procedures. Instance classes are discussed in detail in Chapters 10 and 11.


Utility classes

Perform specific tasks and are independent of the server instance. Utility classes are discussed in detail in Chapters 12 and 13.

SMO has a collection of namespaces that represent different areas of functionality. These are described in Table 9-1.

Table 9-1. SMO namespaces

Namespace

Description

Microsoft.SqlServer.Management.Common

Classes common to SMO and Replication Management Objects (RMO)primarily classes used to establish a connection to a SQL Server instance

Microsoft.SqlServer.Management.Nmo

Classes used to develop and administer Notification Services instances and applications

Microsoft.SqlServer.Management.Smo

Instance classes, utility classes, event handlers, exceptions, and enumerations used to programmatically control SQL Server

Microsoft.SqlServer.Management.Smo.Agent

Classes that represent SQL Server Agent

Microsoft.SqlServer.Management.Smo.Broker

Classes that represent Service Broker

Microsoft.SqlServer.Management.Smo.Mail

Classes that represent Database Mail

Microsoft.SqlServer.Management.Smo.RegisteredServers

Classes that represent registered servers and schemas

Microsoft.SqlServer.Management.Smo.Wmi

Classes that provides programmatic access to the WMI provider for Configuration Management

Microsoft.SqlServer.Management.Trace

Classes that provide programmatic access for tracing and recording events, manipulating and analyzing trace logs, and replaying trace events




Programming SQL Server 2005
Programming SQL Server 2005
ISBN: 0596004796
EAN: 2147483647
Year: 2007
Pages: 147
Authors: Bill Hamilton

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net