Service.SetServiceAccount 메서드

Sets the account under which the SQL Server service runs.

네임스페이스:  Microsoft.SqlServer.Management.Smo.Wmi
어셈블리:  Microsoft.SqlServer.SqlWmiManagement(Microsoft.SqlServer.SqlWmiManagement.dll)

구문

‘선언
Public Sub SetServiceAccount ( _
    userName As String, _
    password As String _
)
‘사용 방법
Dim instance As Service 
Dim userName As String 
Dim password As String

instance.SetServiceAccount(userName, _
    password)
public void SetServiceAccount(
    string userName,
    string password
)
public:
void SetServiceAccount(
    String^ userName, 
    String^ password
)
member SetServiceAccount : 
        userName:string * 
        password:string -> unit
public function SetServiceAccount(
    userName : String, 
    password : String
)

매개 변수

  • userName
    유형: System.String
    A String value that specifies the system account under which the SQL Server service runs.
  • password
    유형: System.String
    A String value that specifies the password for the system account.

WMI 공급자를 사용하여 서비스 및 네트워크 설정 관리

참고 항목

참조

Service 클래스

Microsoft.SqlServer.Management.Smo.Wmi 네임스페이스

관련 자료

WMI and SQL Server

SQL Server 데이터베이스 엔진에 연결