Condividi tramite


ServerDdlTrigger Class

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

Spazio dei nomi: Microsoft.SqlServer.Management.Smo
Assembly : Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Sintassi

'Dichiarazione
Public NotInheritable Class ServerDdlTrigger
    Inherits DdlTriggerBase
public sealed class ServerDdlTrigger : DdlTriggerBase
public ref class ServerDdlTrigger sealed : public DdlTriggerBase
public final class ServerDdlTrigger extends DdlTriggerBase
public final class ServerDdlTrigger extends DdlTriggerBase

Osservazioni

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.

Questo spazio dei nomi, classe o membro è supportato solo nella versione 2.0 di Microsoft .NET Framework.

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.

Inheritance Hierarchy

System.Object
   Microsoft.SqlServer.Management.Smo.SmoObjectBase
     Microsoft.SqlServer.Management.Smo.SqlSmoObject
       Microsoft.SqlServer.Management.Smo.NamedSmoObject
         Microsoft.SqlServer.Management.Smo.ScriptNameObjectBase
           Microsoft.SqlServer.Management.Smo.DdlTriggerBase
            Microsoft.SqlServer.Management.Smo.ServerDdlTrigger

Esempio

How to: Create, Alter, and Remove a Trigger in Visual Basic .NET

Thread Safety

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

Piattaforme

Piattaforme di sviluppo

Per un elenco delle piattaforme supportate, vedere Requisiti hardware e software per l'Installazione di SQL Server 2005.

Piattaforme di destinazione

Per un elenco delle piattaforme supportate, vedere Requisiti hardware e software per l'Installazione di SQL Server 2005.

Vedere anche

Riferimento

ServerDdlTrigger Members
Microsoft.SqlServer.Management.Smo Namespace

Altre risorse

Creating, Altering, and Removing Triggers
Trigger DDL
CREATE TRIGGER (Transact-SQL)