ManagedInstance.AgentProxyAccount 属性

定义

获取用于在 SQL Server 实例上运行计划作业 SQL Server 代理代理帐户。

public:
 property System::String ^ AgentProxyAccount { System::String ^ get(); };
[Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcProperty(Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.Data | Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.Required)]
public string AgentProxyAccount { get; }
[<Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcProperty(Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.Data | Microsoft.SqlServer.Management.Sdk.Sfc.Metadata.SfcPropertyFlags.Required)>]
member this.AgentProxyAccount : string
Public ReadOnly Property AgentProxyAccount As String

属性值

String

一个 String 值,该值指定 SQL Server 代理的代理帐户的名称。

属性

示例

VC#

AgentProxyAccount agentProxyAccount;  
agentProxyAccount = new AgentProxyAccount ();  
System.Console.WriteLine(agentProxyAccount.DateCreated);  

VB

Dim agentProxyAccount As AgentProxyAccount  
agentProxyAccount = New AgentProxyAccount ()   
System.Console.WriteLine(agentProxyAccount.DateCreated)  

PowerShell

$agentProxyAccount = New-Object Microsoft.SqlServer.Management.Utility.AgentProxyAccount  
Write-Host $agentProxyAccount.DateCreated   

注解

SQL Server 代理代理帐户可用于在实例上运行计划的策略检查 SQL Server 。

适用于