SqlServer2005-禁止删除表触发器
USE [TEST]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create trigger [dbsafety] on database
for drop_table,alter_table
as
print N'数据库不允许删除或者更改表';
rollback;
GO
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
ENABLE TRIGGER [dbsafety] ON DATABASE