共用方式為


ServerDdlTrigger.ExecutionContext 屬性

Gets or sets the execution context type used by server DDL trigger, itself, the caller, or a specified login.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public Property ExecutionContext As ServerDdlTriggerExecutionContext 
    Get 
    Set
'用途
Dim instance As ServerDdlTrigger 
Dim value As ServerDdlTriggerExecutionContext 

value = instance.ExecutionContext

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

屬性值

型別:Microsoft.SqlServer.Management.Smo.ServerDdlTriggerExecutionContext
A ServerDdlTriggerExecutionContext object that specifies the type of execution context used by the server DDL trigger.

備註

If you specify that the execution context type is ExecuteAsLogin then you must also set the ExecutionContextLogin property to specify which login to use.

範例

建立、改變和移除觸發程式

請參閱

參考

ServerDdlTrigger 類別

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

DDL 觸發程序

CREATE TRIGGER (Transact-SQL)