Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Updated text: 14 April 2006
Notification Services instances host Notification Services applications and define instance-wide settings, such as the database server, custom delivery protocols, and delivery channels, which represent delivery endpoints.
You can use Instance objects to define new instances or to manage existing instances. To define a new instance, you set its properties and then use the Create method. To manage an existing instance, you get a reference to an existing instance via a NotificationServices object.
When using SQL Server Authentication with a NotificationServices object, you use a Server object to obtain a NotificationServices reference, and then use this reference to get a Notification Services instance. When creating an instance of the Server object, you can specify a ServerConnection object that uses a SqlConnection object.
If you are using SQL Server Authentication to call instance and application management methods such as Create, Update, Drop, Enable, or Disable, the SqlConnection must not already be open.
Make sure the SqlConnection is not opened before the Server object instance is created, or else use another ServerConnection constructor that does not use a SqlConnection object.