Share via


ProxyAccount.AddServerRole Method

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

Namespace:  Microsoft.SqlServer.Management.Smo.Agent
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
Public Sub AddServerRole ( _
    serverRoleName As String _
)
'Usage
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
)

Parameters

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