Instance.RegisterLocal Method (String, String, String, String)

Registers the instance of Notification Services locally and, if the Windows service does not exist, installs the Microsoft Windows service that runs the Notification Services engine. Use this method if using SQL Server Authentication.

命名空間: Microsoft.SqlServer.Management.Nmo
組件: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

語法

'宣告
Public Sub RegisterLocal ( _
    serviceUserName As String, _
    servicePassword As String, _
    sqlUserName As String, _
    sqlPassword As String _
)
public void RegisterLocal (
    string serviceUserName,
    string servicePassword,
    string sqlUserName,
    string sqlPassword
)
public:
void RegisterLocal (
    String^ serviceUserName, 
    String^ servicePassword, 
    String^ sqlUserName, 
    String^ sqlPassword
)
public void RegisterLocal (
    String serviceUserName, 
    String servicePassword, 
    String sqlUserName, 
    String sqlPassword
)
public function RegisterLocal (
    serviceUserName : String, 
    servicePassword : String, 
    sqlUserName : String, 
    sqlPassword : String
)

參數

  • serviceUserName
    A String specifying the Windows user name for the instance of Notification Services.
  • servicePassword
    A String specifying the password for the user.
  • sqlUserName
    A String specifying the SQL Server Login for the Windows service. Specify a value only if using SQL Server Authentication.
  • sqlPassword
    A String specifying the password for the SQL Server Login. Specify a value only if using SQL Server Authentication.

備註

ms199834.note(zh-tw,SQL.90).gif重要事項:
Secure any executable and source code that contains passwords.

For information about the permissions required by the Windows service, see 為 Notification Services 的執行個體設定 Windows 帳戶 and 為 Notification Services 的執行個體設定 SQL Server 權限.

執行緒安全性

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

平台

開發平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

目標平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

請參閱

參考

Instance Class
Instance Members
Microsoft.SqlServer.Management.Nmo Namespace

其他資源

保全檔案與資料夾
部署 Notification Services
更新註冊資訊