Home
> SQL and .NET Blog > Protecting tables, Procedures and … in SQL Server 2008
Protecting tables, Procedures and … in SQL Server 2008
Here is the trigger which protects all the tables and procedures in a database / server.
create trigger triggername
on all server
for create_procedure,alter_procedure,drop_table
as
Print 'you are attempting to drop the table or create procedure or drop procedure'
rollback;
This trigger can also be extended to protect all the verticals like Index, Functions, Views, etc
-Yuva
Categories: SQL and .NET Blog
Comments (0)
Trackbacks (0)
Leave a comment
Trackback