Re: How to prevent DELETEs in a table
From: Kalen Delaney (replies_at_public_newsgroups.com)
Date: 01/04/05
- Next message: Joseph: "RE: SQL2000 (64 bits) edition"
- Previous message: Alex: "Re: Cluster indexing time increasing each week"
- In reply to: Dave: "Re: How to prevent DELETEs in a table"
- Next in thread: AnthonyThomas: "Re: How to prevent DELETEs in a table"
- Reply: AnthonyThomas: "Re: How to prevent DELETEs in a table"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 3 Jan 2005 17:26:27 -0800
Hi Dave
If you are a member of the sysadmin role, permissions do not apply to you.
Basically, SQL Server just skips any permission validation for sysadmins.
-- HTH ---------------- Kalen Delaney SQL Server MVP www.SolidQualityLearning.com "Dave" <dave@nospam.ru> wrote in message news:%23jxSZCf8EHA.2276@TK2MSFTNGP09.phx.gbl... > To paraphrase Dr. Nick: > > Thanks everybody. > > I like the idea of the trigger but I still do not understand why when I > executed the "DENY DELETE ON EMPLOYEES TO public" I could still perform a > DELETE. > > I always thought that a DENY tainted the well and since everyone was part > of > public, everyone would be denied the ability to perform DELETEs. But I > still could. > > Permission changes take effect immediately in SQL Server don't they? > > > > > "Anith Sen" <anith@bizdatasolutions.com> wrote in message > news:ugO5UJe8EHA.3376@TK2MSFTNGP12.phx.gbl... >> Do you want to prevent any deletions at all or do you want to prevent >> certain users from deleting data? To prevent any deletions, create a > INSTEAD >> OF trigger on the table like: >> >> CREATE TRIGGER trg ON tbl INSTEAD OF DELETE >> AS >> IF @@ROWCOUNT > 0 ROLLBACK >> >> -- >> Anith >> >> > >
- Next message: Joseph: "RE: SQL2000 (64 bits) edition"
- Previous message: Alex: "Re: Cluster indexing time increasing each week"
- In reply to: Dave: "Re: How to prevent DELETEs in a table"
- Next in thread: AnthonyThomas: "Re: How to prevent DELETEs in a table"
- Reply: AnthonyThomas: "Re: How to prevent DELETEs in a table"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|