Compartir a través de


JobStep.DatabaseUserName Propiedad

Gets or sets the database user account that the job step assumes when executing the command string.

Espacio de nombres:  Microsoft.SqlServer.Management.Smo.Agent
Ensamblado:  Microsoft.SqlServer.Smo (en Microsoft.SqlServer.Smo.dll)

Sintaxis

'Declaración
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public Property DatabaseUserName As String 
    Get 
    Set
'Uso
Dim instance As JobStep 
Dim value As String 

value = instance.DatabaseUserName

instance.DatabaseUserName = value
[SfcPropertyAttribute(SfcPropertyFlags.Standalone)]
public string DatabaseUserName { get; set; }
[SfcPropertyAttribute(SfcPropertyFlags::Standalone)]
public:
property String^ DatabaseUserName {
    String^ get ();
    void set (String^ value);
}
[<SfcPropertyAttribute(SfcPropertyFlags.Standalone)>]
member DatabaseUserName : string with get, set
function get DatabaseUserName () : String 
function set DatabaseUserName (value : String)

Valor de la propiedad

Tipo: System.String
A String value that specifies the name of the database user.

Comentarios

A Microsoft SQL Server Agent job step can execute by assuming the rights of a database user. Change the DatabaseUserName property to set the user execution context for a job step. The default value is dbo, and job steps execute using database owner permissions.

Ejemplos

Programar tareas administrativas automáticas en el Agente SQL Server

Vea también

Referencia

JobStep Clase

Espacio de nombres Microsoft.SqlServer.Management.Smo.Agent

Otros recursos

Tareas administrativas automatizadas (Agente SQL Server)

sp_help_jobstep (Transact-SQL)