Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 25. DDL Triggers > Solutions Fast Track

Solutions Fast Track

DDL Triggers Explained

DDL triggers fire on DDL statements such as CREATE.

Events or event groups specified in the DDL trigger definition, determine what a particular DDL trigger will fire on.

DDL triggers can be of server or database scope.

DDL triggers always fire after the statement is executed, and they provide rollback capabilities.


Implementing DDL Triggers

DDL triggers follow a syntax similar to DML triggers.

When dropping a DDL trigger, specifying the scope is required.

Event information is stored in the EVENTDATA() function, which returns an xml type. Use XQuery() methods within SQL Server 2005 to parse the XML.



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial