Export (0) Print
Expand All

Event Groups for Use with DDL Triggers

SQL Server 2005

Updated: 14 April 2006

The following diagram lists the event groups that can be used to fire a DDL trigger, the Transact-SQL statements that they cover, and the scope at which they can be programmed (ON SERVER or ON DATABASE). Note the inclusive nature of the event groups, as indicated by the tree structure. For example, a DDL trigger that specifies FOR DDL_TABLE_EVENTS covers the CREATE TABLE, ALTER TABLE, and DROP TABLE Transact-SQL statements, and a DDL trigger that specifies FOR DDL_TABLE_VIEW_EVENTS covers all Transact-SQL statements under DDL_TABLE_EVENTS, DDL_VIEW_EVENTS, DDL_INDEX_EVENTS, and DDL_STATISTICS_EVENTS.

ms191441.note(en-US,SQL.90).gifImportant:
Certain system stored procedures that perform DDL-like operations can also fire DDL triggers. Test your DDL triggers to determine their responses to system stored procedures that are run. For example, the CREATE TYPE statement and sp_addtype stored procedure will both fire a DDL trigger that is created on a CREATE_TYPE event. However, the sp_rename stored procedure does not fire any DDL triggers.

DDL event groups for use with DDL triggers

Release History

14 April 2006

New content:
  • Added an important note that recommends testing DDL triggers to determine their responses to stored procedure that are executed.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft