Compartir a través de


DatabaseDdlTrigger Clase

The DatabaseDdlTrigger object represents a SQL Server database data definition language (DDL) trigger.

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

Sintaxis

'Declaración
<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)> _
<PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)> _
<SfcElementTypeAttribute("DdlTrigger")> _
Public NotInheritable Class DatabaseDdlTrigger _
    Inherits DdlTriggerBase _
    Implements IExtendedProperties
'Uso
Dim instance As DatabaseDdlTrigger
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)]
[PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)]
[SfcElementTypeAttribute("DdlTrigger")]
public sealed class DatabaseDdlTrigger : DdlTriggerBase, 
    IExtendedProperties
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode::CheckOnSchedule)]
[PhysicalFacetAttribute(PhysicalFacetOptions::ReadOnly)]
[SfcElementTypeAttribute(L"DdlTrigger")]
public ref class DatabaseDdlTrigger sealed : public DdlTriggerBase, 
    IExtendedProperties
[<SealedAttribute>]
[<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)>]
[<PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)>]
[<SfcElementTypeAttribute("DdlTrigger")>]
type DatabaseDdlTrigger =  
    class
        inherit DdlTriggerBase
        interface IExtendedProperties
    end
public final class DatabaseDdlTrigger extends DdlTriggerBase implements IExtendedProperties

Notas

DDL triggers run a Transact-SQL or user-defined function in response to certain DDL events.

SMO provides programmatic access to allow management of all DDL trigger functionality with the DatabaseDdlTrigger object and the ServerDdlTrigger object.

Database DDL triggers respond to events within the scope of the database and server DDL triggers respond to events within the scope of the SQL Server instance.

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

To set DatabaseDdlTrigger object properties, users must have ALTER ANY DATABASE DDL TRIGGER permission on the database.

To create a DDL trigger, users must have ALTER ANY DATABASE DDL TRIGGER permission on the database.

To drop a DDL trigger, users must have ALTER ANY DATABASE DDL TRIGGER permission on the database.

To enable or disable the DDL trigger, users must have ALTER ANY DATABASE DDL TRIGGER permission on the database.

Thread Safety

Todos los miembros estáticos (compartidos en Microsoft Visual Basic) públicos de este tipo son seguros para operaciones multiproceso. No se garantiza que los miembros de instancia sean seguros para subprocesos.

Seguridad para subprocesos

Todos los miembros públicos static (Shared en Visual Basic) de este tipo son seguros para subprocesos. No se garantiza que los miembros de instancia sean seguros para subprocesos.