ServerDdlTrigger ServerDdlTrigger ServerDdlTrigger Constructors

Definition

Overloads

ServerDdlTrigger() ServerDdlTrigger() ServerDdlTrigger()

Initializes a new instance of the ServerDdlTrigger class.

ServerDdlTrigger(Server, String) ServerDdlTrigger(Server, String)

Initializes a new instance of the ServerDdlTrigger class on the specified instance of SQL Server and that has the specified name.

ServerDdlTrigger(Server, String, ServerDdlTriggerEventSet, String) ServerDdlTrigger(Server, String, ServerDdlTriggerEventSet, String) ServerDdlTrigger(Server, String, ServerDdlTriggerEventSet, String)

Initializes a new instance of the ServerDdlTrigger class on the specified database that has the specified name. The trigger responds to the specified event set and runs the specified batch.

ServerDdlTrigger(Server, String, ServerDdlTriggerEventSet, String, String, String) ServerDdlTrigger(Server, String, ServerDdlTriggerEventSet, String, String, String) ServerDdlTrigger(Server, String, ServerDdlTriggerEventSet, String, String, String)

Initializes a new instance of the ServerDdlTrigger class on the specified instance of SQL Server and that has the specified name. The trigger responds to the specified event set and runs the specified batch.

ServerDdlTrigger() ServerDdlTrigger() ServerDdlTrigger()

Initializes a new instance of the ServerDdlTrigger class.

public:
 ServerDdlTrigger();
public ServerDdlTrigger ();
Public Sub New ()

Examples

Creating, Altering, and Removing Triggers

Remarks

The default constructor initializes any fields to their default values.

See Also

ServerDdlTrigger(Server, String) ServerDdlTrigger(Server, String)

Initializes a new instance of the ServerDdlTrigger class on the specified instance of SQL Server and that has the specified name.

public:
 ServerDdlTrigger(Microsoft::SqlServer::Management::Smo::Server ^ server, System::String ^ name);
public ServerDdlTrigger (Microsoft.SqlServer.Management.Smo.Server server, string name);
Parameters
server
Server Server Server

A Server object value that specifies the instance of SQL Server on which the database data definition language (DDL) trigger is created.

name
String String String

A String value that specifies the name of the database DDL trigger.

Examples

Creating, Altering, and Removing Triggers

ServerDdlTrigger(Server, String, ServerDdlTriggerEventSet, String) ServerDdlTrigger(Server, String, ServerDdlTriggerEventSet, String) ServerDdlTrigger(Server, String, ServerDdlTriggerEventSet, String)

Initializes a new instance of the ServerDdlTrigger class on the specified database that has the specified name. The trigger responds to the specified event set and runs the specified batch.

public:
 ServerDdlTrigger(Microsoft::SqlServer::Management::Smo::Server ^ parent, System::String ^ name, Microsoft::SqlServer::Management::Smo::ServerDdlTriggerEventSet ^ events, System::String ^ textBody);
public ServerDdlTrigger (Microsoft.SqlServer.Management.Smo.Server parent, string name, Microsoft.SqlServer.Management.Smo.ServerDdlTriggerEventSet events, string textBody);
Public Sub New (parent As Server, name As String, events As ServerDdlTriggerEventSet, textBody As String)
Parameters
parent
Server Server Server

A Server object value that specifies the parent of the ServerDdlTrigger object.

name
String String String

A String value that specifies the name of the server data definition language (DDL) trigger.

events
ServerDdlTriggerEventSet ServerDdlTriggerEventSet ServerDdlTriggerEventSet

A ServerDdlTriggerEventSet object that specifies the DDL events to which the trigger responds.

textBody
String String String

A String value that specifies the Transact-SQL batch statement that runs when the trigger has been raised.

Examples

Creating, Altering, and Removing Triggers

ServerDdlTrigger(Server, String, ServerDdlTriggerEventSet, String, String, String) ServerDdlTrigger(Server, String, ServerDdlTriggerEventSet, String, String, String) ServerDdlTrigger(Server, String, ServerDdlTriggerEventSet, String, String, String)

Initializes a new instance of the ServerDdlTrigger class on the specified instance of SQL Server and that has the specified name. The trigger responds to the specified event set and runs the specified batch.

public:
 ServerDdlTrigger(Microsoft::SqlServer::Management::Smo::Server ^ parent, System::String ^ name, Microsoft::SqlServer::Management::Smo::ServerDdlTriggerEventSet ^ events, System::String ^ assemblyName, System::String ^ className, System::String ^ method);
public ServerDdlTrigger (Microsoft.SqlServer.Management.Smo.Server parent, string name, Microsoft.SqlServer.Management.Smo.ServerDdlTriggerEventSet events, string assemblyName, string className, string method);
Public Sub New (parent As Server, name As String, events As ServerDdlTriggerEventSet, assemblyName As String, className As String, method As String)
Parameters
parent
Server Server Server

A Server object value that specifies the parent of the ServerDdlTrigger object.

name
String String String

A String value that specifies the name of the server data definition language (DDL) trigger.

events
ServerDdlTriggerEventSet ServerDdlTriggerEventSet ServerDdlTriggerEventSet

A ServerDdlTriggerEventSet object that specifies the DDL events to which the DDL trigger responds.

assemblyName
String String String

A String value that specifies the name of the registered assembly that contains the user-defined function that runs when the DDL trigger is raised.

className
String String String

A String value that specifies the name of the class in the registered assembly.

method
String String String

A String value that specifies the method within the class that runs when the DDL trigger is raised.

Examples

Creating, Altering, and Removing Triggers

See Also

Applies to