Partager via


AddServerRole méthode

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

Espace de noms :  Microsoft.SqlServer.Management.Smo.Agent
Assembly :  Microsoft.SqlServer.Smo (dans Microsoft.SqlServer.Smo.dll)

Syntaxe

'Déclaration
Public Sub AddServerRole ( _
    serverRoleName As String _
)
'Utilisation
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
)

Paramètres

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