Search code examples
sql-servereventtriggerxp-cmdshell

How to write a trigger firing when someone made specific changes and saved on SQL Server


I am new to SQL triggers scripting. Right now, I want to write a trigger firing when someone modify a create or alter statement in table definition in SQL Server and saved.

Can someone please tell me what can make this happen and what kind of trigger should I research on?

So far I have only read some dml triggers tutorial and it's not quite alike to what I want.


Solution

  • DDL is my option to do it. http://msdn.microsoft.com/en-us/library/ms186406(v=sql.105).aspx