共用方式為


AddMsdbRole 方法

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

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

語法

'宣告
Public Sub AddMsdbRole ( _
    msdbRoleName As String _
)
'用途
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
)

參數

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