Export (0) Print
Expand All

DatabaseDdlTrigger Constructor

 

Applies To: SQL Server 2016 Preview

Initializes a new instance of the DatabaseDdlTrigger class.

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

NameDescription
System_CAPS_pubmethodDatabaseDdlTrigger()

Initializes a new instance of the DatabaseDdlTrigger class.

System_CAPS_pubmethodDatabaseDdlTrigger(Database, String)

Initializes a new instance of the DatabaseDdlTrigger class on the specified database and with the specified name.

System_CAPS_pubmethodDatabaseDdlTrigger(Database, String, DatabaseDdlTriggerEventSet, String)

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

System_CAPS_pubmethodDatabaseDdlTrigger(Database, String, DatabaseDdlTriggerEventSet, String, String, String)

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

Return to top

DatabaseDdlTrigger Constructor ()

Initializes a new instance of the DatabaseDdlTrigger class.

public DatabaseDdlTrigger()

The default constructor initializes any fields to their default values.

Legacy Code Example

Return to top

DatabaseDdlTrigger Constructor (Database, String)

Initializes a new instance of the DatabaseDdlTrigger class on the specified database and with the specified name.

public DatabaseDdlTrigger(
	Database database,
	string name
)

Parameters

database
Type: Microsoft.SqlServer.Management.Smo.Database

A Database object value that specifies the database on which the database DDL trigger is created.

name
Type: System.String

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

Legacy Code Example

Return to top

DatabaseDdlTrigger Constructor (Database, String, DatabaseDdlTriggerEventSet, String)

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

public DatabaseDdlTrigger(
	Database parent,
	string name,
	DatabaseDdlTriggerEventSet events,
	string textBody
)

Parameters

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

A Database object value that specifies the parent of the DatabaseDdlTrigger object.

name
Type: System.String

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

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

A DatabaseDdlTriggerEventSet 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.

Legacy Code Example

Return to top

DatabaseDdlTrigger Constructor (Database, String, DatabaseDdlTriggerEventSet, String, String, String)

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

public DatabaseDdlTrigger(
	Database parent,
	string name,
	DatabaseDdlTriggerEventSet events,
	string assemblyName,
	string className,
	string method
)

Parameters

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

A Database object value that specifies the parent of the DatabaseDdlTrigger object.

name
Type: System.String

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

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

A DatabaseDdlTriggerEventSet 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.

Legacy Code Example

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