Instance Constructor (NotificationServices, String)
Initializes a new instance of the Instance class with a NotificationServices object and a name.
命名空间: Microsoft.SqlServer.Management.Nmo
程序集: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
语法
声明
Public Sub New ( _
notificationServices As NotificationServices, _
name As String _
)
public Instance (
NotificationServices notificationServices,
string name
)
public:
Instance (
NotificationServices^ notificationServices,
String^ name
)
public Instance (
NotificationServices notificationServices,
String name
)
public function Instance (
notificationServices : NotificationServices,
name : String
)
参数
- notificationServices
The NotificationServices for the Notification Services instance. This parameter sets the Parent property.
name
A String, between 1 and 64 characters in length, that specifies the name of the Notification Services instance. You use this instance name when administering the instance of Notification Services.You cannot change the instance name. You must drop the instance and create it again to change the name. If you attempt to change the name NMO will throw an exception.
备注
已更新的文本:2005 年 12 月 5 日
Each Notification Services instance on a 数据库引擎 instance must have a unique name, which is not case-sensitive. For example, MyInstance and myinstance are not considered unique names.
Because this name is used for database objects, follow the SQL Server rules for regular identifiers. Do not use SQL Server reserved keywords or special characters, such as backslash (/), forward slash (\), left bracket ([), right bracket (]), double quotes ("), and single quote ('). For more information about SQL Server identifiers, see 标识符.
This constructor sets the following default property values.
Property |
Value |
false |
|
"dbo" |
示例
The following examples show how to use this constructor:
Instance myInstance = new Instance(
notificationServices, instanceName);
Dim myInstance As Instance = _
New Instance(notificationServices, instanceName)
平台
开发平台
有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。
目标平台
有关支持的平台列表,请参阅安装 SQL Server 2005 的硬件和软件要求。
请参阅
参考
Instance Class
Instance Members
Microsoft.SqlServer.Management.Nmo Namespace
DatabaseName
其他资源
配置 Notification Services 实例
NotificationServicesInstance Element (ICF)