Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Page History: DDL Trigger Sample - SQL Server

Compare Page Revisions



« Older Revision - Back to Page History - Current Revision


Page Revision: Fri, Jun 04, 2010, 9:37 AM


This DDL trigger will print the text Command(s) completed successfully. John Doe eats worms. whenever a function, procedure, or view is created or altered in the current database. To change the scope to the entire server, change on database to on all server.

create trigger TestTrigger
on database
for create_function, alter_function, create_procedure, alter_procedure, create_view, alter_view
as begin

print 'Command(s) completed successfully.  John Doe eats worms.'

end

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.