共用方式為


ProxyAccount Constructor (JobServer, String, String, Boolean)

Initializes a new instance of the ProxyAccount class on the specified SQL Server Agent Service with the specified name and credential. It also specifies whether the proxy account is enabled.

命名空間: Microsoft.SqlServer.Management.Smo.Agent
組件: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

語法

'宣告
Public Sub New ( _
    jobServer As JobServer, _
    proxyName As String, _
    credentialName As String, _
    enabled As Boolean _
)
public ProxyAccount (
    JobServer jobServer,
    string proxyName,
    string credentialName,
    bool enabled
)
public:
ProxyAccount (
    JobServer^ jobServer, 
    String^ proxyName, 
    String^ credentialName, 
    bool enabled
)
public ProxyAccount (
    JobServer jobServer, 
    String proxyName, 
    String credentialName, 
    boolean enabled
)
public function ProxyAccount (
    jobServer : JobServer, 
    proxyName : String, 
    credentialName : String, 
    enabled : boolean
)

參數

  • jobServer
    A JobServer object that specifies the SQL Server Agent Service.
  • proxyName
  • credentialName
    A String value that specifies the credential name.
  • enabled
    A Boolean value that specifies whether the proxy account is enabled.

備註

只有 Microsoft .NET Framework 2.0 版支援此命名空間、類別或成員。

範例

How to: Allow User Access to Subsystem by Using a Proxy Account in Visual Basic .NET

平台

開發平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

目標平台

如需受支援的平台清單,請參閱<安裝 SQL Server 2005 的硬體和軟體需求>。

請參閱

參考

ProxyAccount Class
ProxyAccount Members
Microsoft.SqlServer.Management.Smo.Agent Namespace

其他資源

Scheduling Automatic Administrative Tasks in SQL Server Agent
自動化管理工作 (SQL Server Agent)
sp_add_proxy (Transact-SQL)
sp_grant_proxy_to_subsystem (Transact-SQL)