ProxyAccount.AddMsdbRole Method

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

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

Syntax

'Declaration
Public Sub AddMsdbRole ( _
    msdbRoleName As String _
)
'Usage
Dim instance As ProxyAccount 
Dim msdbRoleName As String

instance.AddMsdbRole(msdbRoleName)
public void AddMsdbRole(
    string msdbRoleName
)
public:
void AddMsdbRole(
    String^ msdbRoleName
)
member AddMsdbRole : 
        msdbRoleName:string -> unit
public function AddMsdbRole(
    msdbRoleName : String
)

Parameters

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

Examples

Scheduling Automatic Administrative Tasks in SQL Server Agent

See Also

Reference

ProxyAccount Class

Microsoft.SqlServer.Management.Smo.Agent Namespace

Other Resources

Automated Administration Tasks (SQL Server Agent)

sp_add_proxy (Transact-SQL)

sp_grant_proxy_to_subsystem (Transact-SQL)