Share via


Trigger 類別

The Trigger object represents a SQL Server trigger.

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

語法

'宣告
<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)> _
<PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)> _
Public NotInheritable Class Trigger _
    Inherits ScriptNameObjectBase _
    Implements ICreatable, IAlterable, IDroppable, IMarkForDrop,  _
    IExtendedProperties, IScriptable, ITextObject
'用途
Dim instance As Trigger
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)]
[PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)]
public sealed class Trigger : ScriptNameObjectBase, 
    ICreatable, IAlterable, IDroppable, IMarkForDrop, IExtendedProperties, 
    IScriptable, ITextObject
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode::CheckOnSchedule)]
[PhysicalFacetAttribute(PhysicalFacetOptions::ReadOnly)]
public ref class Trigger sealed : public ScriptNameObjectBase, 
    ICreatable, IAlterable, IDroppable, IMarkForDrop, IExtendedProperties, 
    IScriptable, ITextObject
[<SealedAttribute>]
[<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)>]
[<PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)>]
type Trigger =  
    class
        inherit ScriptNameObjectBase
        interface ICreatable
        interface IAlterable
        interface IDroppable
        interface IMarkForDrop
        interface IExtendedProperties
        interface IScriptable
        interface ITextObject
    end
public final class Trigger extends ScriptNameObjectBase implements ICreatable, IAlterable, IDroppable, IMarkForDrop, IExtendedProperties, IScriptable, ITextObject

備註

To get Trigger object properties, users can be a member of the public fixed server role.

To set Trigger object properties, users must have ALTER permission on the parent table or view.

To create or drop a trigger, users must have ALTER permission on the parent table or view.

To grant, deny, or revoke permission on the trigger to other users, users must have CONTROL permission on the trigger.

Thread Safety

這種類型的任何公用靜態 (在 Microsoft Visual Basic 中則為 Shared) 成員都可用於多執行緒作業。並不是所有的執行個體成員都保證可以用於所有的執行緒。

執行緒安全性

這個類型的任何公用static (在 Visual Basic 中為 Shared) 成員都是安全執行緒。不保證任何執行個體成員都可以是安全執行緒。