Hello William,
Deploying a DDL trigger with Visual Studio isn't quite intutive. This seems
to work for me:
[Microsoft.SqlServer.Server.SqlTrigger(Name = "ddltrigger",Target="database",
Event = "FOR DDL_DATABASE_LEVEL_EVENTS")]
public static void ddltrigger()
{
// Replace with your own code
SqlContext.Pipe.Send("Trigger FIRED");
}
So, Target should be either database|all_server, while the events are documented
nicely in "Event Groups for Use with DDL Triggers" [0].
[0]: http://msdn2.microsoft.com/en-us/library/ms191441.aspx
Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/
|