Share via


Classe Trigger

The Trigger object represents a SQL Server trigger.

Espace de noms :  Microsoft.SqlServer.Management.Smo
Assembly :  Microsoft.SqlServer.Smo (dans Microsoft.SqlServer.Smo.dll)

Syntaxe

'Déclaration
<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)> _
<PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)> _
Public NotInheritable Class Trigger _
    Inherits ScriptNameObjectBase _
    Implements ICreatable, IAlterable, IDroppable, IMarkForDrop,  _
    IExtendedProperties, IScriptable, ITextObject
'Utilisation
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

Notes

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

Tout membre statique public (Partagé dans Microsoft Visual Basic) de ce type est sûr dans le cadre des opérations à plusieurs threads. Tous les membres de l'instance ne sont pas garantis comme sûrs.

Sécurité des threads

Tous les membres publics static (Shared dans Visual Basic) de ce type sont thread-safe. Il n'est pas garanti que les membres d'instance soient thread-safe.