Link to home
Start Free TrialLog in
Avatar of shahjagat
shahjagatFlag for United States of America

asked on

Deny acess to a DB

How can I prevent access to a DB? I need to grant permission to the DB only to the login that created it and deny permission to all other users including the other sysadmin.

Appreciate your help!!
ASKER CERTIFIED SOLUTION
Avatar of lcohan
lcohan
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
From SQL security point of view I suggest for the future to use Database Role(s) and grant/deny all rights you want from/to that role then add users to that db role. This way you don't need to worry about each individual user.
Avatar of shahjagat

ASKER

How about sysadmin? can we deny permission on sysadmin to access database that another sysadmin created?
No, that is not possible unless you remove that user from sysadmin role.
"
sysadmin:
Members of the sysadmin fixed server role can perform any activity in the server.
 "

http://msdn.microsoft.com/en-us/library/ms188659.aspx