共用方式為


AddServerRole 方法

Adds a Microsoft SQL Server server role to the proxy account.

命名空間:  Microsoft.SqlServer.Management.Smo.Agent
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
Public Sub AddServerRole ( _
    serverRoleName As String _
)
'用途
Dim instance As ProxyAccount
Dim serverRoleName As String

instance.AddServerRole(serverRoleName)
public void AddServerRole(
    string serverRoleName
)
public:
void AddServerRole(
    String^ serverRoleName
)
member AddServerRole : 
        serverRoleName:string -> unit 
public function AddServerRole(
    serverRoleName : String
)

參數

  • serverRoleName
    型別:System. . :: . .String
    A String value that specifies the SQL Server server role that is associated with the proxy account.