Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Grant Who?

Author  Topic 

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2004-11-23 : 10:47:58
I thought I knew the answer to this but it didn't work so I'm afriad I am asking the stupid question of the day

Let's say I want to deny delete access to all the tables and views that I have created in a specific database to a group of users. How do I do it?

I want something like

DENY DELETE
ON (all my tables and views)
TO MyUserGroup

What would be the impact of denying the same access rights to the system created tables and views?

Many thanks


steve

To alcohol ! The cause of - and solution to - all of life's problems

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-11-23 : 14:04:07
Something like this:

SELECT 'DENY DELETE ON dbo.' + name + ' TO MyUserGroup'
FROM sysobjects
WHERE type IN ('U', 'V')

Just weed out the system objects from that list just in case. Users would never be deleting from them, but you never know what goes on internally.

Tara
Go to Top of Page

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2004-11-23 : 18:19:43
Thanks Tara, you're a star


steve

To alcohol ! The cause of - and solution to - all of life's problems
Go to Top of Page
   

- Advertisement -