Share via


Classe ProxyAccount

The ProxyAccount class represents a SQL Server Agent proxy account.

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

Sintaxe

'Declaração
Public NotInheritable Class ProxyAccount _
    Inherits AgentObjectBase _
    Implements IAlterable, ICreatable, IDroppable, IRenamable,  _
    IScriptable
'Uso
Dim instance As ProxyAccount
public sealed class ProxyAccount : AgentObjectBase, 
    IAlterable, ICreatable, IDroppable, IRenamable, IScriptable
public ref class ProxyAccount sealed : public AgentObjectBase, 
    IAlterable, ICreatable, IDroppable, IRenamable, IScriptable
[<SealedAttribute>]
type ProxyAccount =  
    class
        inherit AgentObjectBase
        interface IAlterable
        interface ICreatable
        interface IDroppable
        interface IRenamable
        interface IScriptable
    end
public final class ProxyAccount extends AgentObjectBase implements IAlterable, ICreatable, IDroppable, IRenamable, IScriptable

Comentários

Proxy accounts allow for the impersonation of logins, server roles, and database roles when executing a job step in any subsystem other than Transact-SQL. In SQL Server Management Objects (SMO), the ProxyAccount object allows programmatic control over proxy accounts. The ProxyAccount object describes the relationship between an alternative (proxy) login account, a subsystem that is used for job step execution, and a list of Microsoft SQL Server logins, server roles, and database roles.

To get ProxyAccount object properties, users must be a member of the SQLAgentOperatorRole on the MSDB database, or be a member of the sysadmin fixed server role.

To set ProxyAccount object properties, users must be a member of the sysadmin fixed server role.

To create or drop a proxy account, users must be a member of the sysadmin fixed server role.

To add or remove subsystems from the proxy account, users must be a member of the sysadmin fixed server role.

Thread Safety

Qualquer membro público estático (Compartilhado no Microsoft Visual Basic) desse tipo é seguro para operações multi-threaded. Não há garantia de que qualquer membro de instância seja seguro para threads.

Segurança de thread

Quaisquer membros static (Shared no Visual Basic) públicos deste tipo são thread-safe. Não há garantia de que qualquer membro de instância seja thread-safe.