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
 General SQL Server Forums
 New to SQL Server Programming
 Prevent user from deleting tables

Author  Topic 

lio2007
Starting Member

8 Posts

Posted - 2007-12-12 : 13:58:09
Hi,

How can I prevent a colleage to delete tables in a specific database.
Yes he has access to Enterprise Manager. We would like to allow him read only to the live databases.

Is this possible?

X002548
Not Just a Number

15586 Posts

Posted - 2007-12-12 : 14:00:52
ummm...yes?


Give them DataReader Access only



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

lio2007
Starting Member

8 Posts

Posted - 2007-12-12 : 14:07:00
Shouldn't it be denydatawriter? What happens if this user is administrator will the role overwrite the administrator?


quote:
Originally posted by X002548

ummm...yes?


Give them DataReader Access only



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam





Go to Top of Page

dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2007-12-12 : 16:43:07
quote:
Originally posted by lio2007

Shouldn't it be denydatawriter? What happens if this user is administrator will the role overwrite the administrator?



Datareader Access as suggested originally would limit that user's permissions to read only on the dataset, provided that user is not already an sa or dbo on the specificed database.

If the user is an administrator, one would hope they are smart enough not to delete the table in the first place. Maybe the person shouldn't be an admin if that is a concern.





Poor planning on your part does not constitute an emergency on my part.

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-12-12 : 16:44:51
quote:
Originally posted by lio2007

Shouldn't it be denydatawriter? What happens if this user is administrator will the role overwrite the administrator?



If they are a sysadmin, then they can just remove the denydatawriter role.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -