Using DDL Triggers
DDL triggers were introduced in SQL Server 2005. These triggers focus on changes to the definition of database objects as opposed to changes to the actual data. The definition of database objects is dictated by the DDL events that these triggers respond to.
The DDL events that these triggers fire on can be broken down into two main categories. The first category includes DDL events that are scoped at the database level and affect the definition of objects such as tables, indexes, and users. The second category of DDL triggers is scoped at the server level. These triggers apply to server objects, such as logins.
The number of DDL events at the database level far exceeds the number at the server level. Table 26.2 lists the DDL ...
Get Microsoft® SQL Server 2012 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.