Aracılığıyla paylaş


DatabaseDdlTrigger.ExecutionContextUser Property

Gets or sets the database user that is the context used when the database DDL trigger executes.

This API is not CLS-compliant. 

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Bildirim
<CLSCompliantAttribute(False)> _
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase)> _
<SfcReferenceAttribute(GetType(User), "Server[@Name = '{0}']/Database[@Name = '{1}']/User[@Name = '{2}']",  _
    )> _
Public Property ExecutionContextUser As String
    Get
    Set
'Kullanım
Dim instance As DatabaseDdlTrigger
Dim value As String

value = instance.ExecutionContextUser

instance.ExecutionContextUser = value
[CLSCompliantAttribute(false)]
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)]
[SfcReferenceAttribute(typeof(User), "Server[@Name = '{0}']/Database[@Name = '{1}']/User[@Name = '{2}']", 
    )]
public string ExecutionContextUser { get; set; }
[CLSCompliantAttribute(false)]
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::Standalone|SfcPropertyFlags::SqlAzureDatabase)]
[SfcReferenceAttribute(typeof(User), L"Server[@Name = '{0}']/Database[@Name = '{1}']/User[@Name = '{2}']", 
    )]
public:
property String^ ExecutionContextUser {
    String^ get ();
    void set (String^ value);
}
[<CLSCompliantAttribute(false)>]
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase)>]
[<SfcReferenceAttribute(typeof(User), "Server[@Name = '{0}']/Database[@Name = '{1}']/User[@Name = '{2}']", 
    )>]
member ExecutionContextUser : string with get, set
function get ExecutionContextUser () : String
function set ExecutionContextUser (value : String)

Property Value

Type: System.String
A String value that specifies the database user that is the context used when the database DDL trigger executes.

Remarks

This property is required only when the ExecutionContext property is set to ExecuteAsUser.

Examples

Setting Properties

See Also

Reference

DatabaseDdlTrigger Class

Microsoft.SqlServer.Management.Smo Namespace

Other Resources

Creating, Altering, and Removing Triggers

DDL Triggers

CREATE TRIGGER (Transact-SQL)