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.
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
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.