ServerDdlTrigger Class

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

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

Syntax

'Declaration
<SfcElementTypeAttribute("DdlTrigger")> _
<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)> _
<PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)> _
Public NotInheritable Class ServerDdlTrigger _
    Inherits DdlTriggerBase
'Usage
Dim instance As ServerDdlTrigger
[SfcElementTypeAttribute("DdlTrigger")]
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)]
[PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)]
public sealed class ServerDdlTrigger : DdlTriggerBase
[SfcElementTypeAttribute(L"DdlTrigger")]
[EvaluationModeAttribute(AutomatedPolicyEvaluationMode::CheckOnSchedule)]
[PhysicalFacetAttribute(PhysicalFacetOptions::ReadOnly)]
public ref class ServerDdlTrigger sealed : public DdlTriggerBase
[<SealedAttribute>]
[<SfcElementTypeAttribute("DdlTrigger")>]
[<EvaluationModeAttribute(AutomatedPolicyEvaluationMode.CheckOnSchedule)>]
[<PhysicalFacetAttribute(PhysicalFacetOptions.ReadOnly)>]
type ServerDdlTrigger =  
    class
        inherit DdlTriggerBase
    end
public final class ServerDdlTrigger extends DdlTriggerBase

Remarks

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

SQL Server Management Objects (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 ServerDdlTrigger object properties, users can be a member of the public fixed server role.

To set ServerDdlTrigger object properties, users must have CONTROL SERVER permission on the server or be a member of the sysadmin fixed server role.

To create or drop a server-level DDL trigger, users must have CONTROL SERVER permission on the server or be a member of the sysadmin fixed server role.

Thread Safety

Any public static (Shared in Microsoft Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.