如果您需要防止某些用户删除表,请尝试以下操作:
DENY DELETE ON OBJECT::dbo.table_to_deny TO restricted_user;
Run Code Online (Sandbox Code Playgroud)
http://msdn.microsoft.com/en-us/library/ms173724.aspx
尝试使用 DDL 触发器 FOR DROP_TABLE:
CREATE TRIGGER NO_DROP_TABLE
ON DATABASE
FOR DROP_TABLE
AS
PRINT 'Dropping tables are not allowed'
ROLLBACK
Run Code Online (Sandbox Code Playgroud)