Re: Howto give users permission to create tables, but deny them DROP?



For 2005 uas a DDL trigger
USE AdventureWorks
IF EXISTS (SELECT * FROM sys.triggers
WHERE parent_class = 0 AND name = 'safety')
DROP TRIGGER safety
ON DATABASE
GO
CREATE TRIGGER safety
ON DATABASE
FOR DROP_TABLE
AS
RAISERROR ('You must disable Trigger "safety" to drop tables!',10,
1)
ROLLBACK
GO
cc wrote:
Ok to protect users from themselves and also from an injection attack, what
permissions would one grant to a user login to allow them the ability to
create, alter, update tables and data on a db, but deny them the ability to
drop a table? Basically, my users have the expectation to be able to
create/edit their dbs on the fly (yah, I know . . . ) but I would like to
make it so that I, the dba, would have to step in to delete a table. Is this
possible?

Thank you,

Chad

.