Export (0) Print
Expand All

ServerDdlTrigger Constructor

 

Applies To: SQL Server 2016 Preview

Initializes a new instance of the ServerDdlTrigger class.

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

NameDescription
System_CAPS_pubmethodServerDdlTrigger()

Initializes a new instance of the ServerDdlTrigger class.

System_CAPS_pubmethodServerDdlTrigger(Server, String)

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

System_CAPS_pubmethodServerDdlTrigger(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.

System_CAPS_pubmethodServerDdlTrigger(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.

Return to top

ServerDdlTrigger Constructor ()

Initializes a new instance of the ServerDdlTrigger class.

public ServerDdlTrigger()

The default constructor initializes any fields to their default values.

Return to top

ServerDdlTrigger Constructor (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(
	Server server,
	string name
)

Parameters

server
Type: Microsoft.SqlServer.Management.Smo.Server

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

name
Type: System.String

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

Return to top

ServerDdlTrigger Constructor (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(
	Server parent,
	string name,
	ServerDdlTriggerEventSet events,
	string textBody
)

Parameters

parent
Type: Microsoft.SqlServer.Management.Smo.Server

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

name
Type: System.String

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

events
Type: Microsoft.SqlServer.Management.Smo.ServerDdlTriggerEventSet

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

textBody
Type: System.String

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

Return to top

ServerDdlTrigger Constructor (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(
	Server parent,
	string name,
	ServerDdlTriggerEventSet events,
	string assemblyName,
	string className,
	string method
)

Parameters

parent
Type: Microsoft.SqlServer.Management.Smo.Server

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

name
Type: System.String

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

events
Type: Microsoft.SqlServer.Management.Smo.ServerDdlTriggerEventSet

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

assemblyName
Type: System.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
Type: System.String

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

method
Type: System.String

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

Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft