Service.SetServiceAccount(String, String) 方法

定義

設定 SQL Server 服務執行時所用的帳戶。

public:
 void SetServiceAccount(System::String ^ userName, System::String ^ password);
public void SetServiceAccount (string userName, string password);
member this.SetServiceAccount : string * string -> unit
Public Sub SetServiceAccount (userName As String, password As String)

參數

userName
String

String值,指定用來執行 SQL Server 服務的系統帳戶。

password
String

指定系統帳戶密碼的 String 值。

範例

使用 WMI 提供者管理服務和網路設定

適用於

另請參閱