By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,414 Members | 1,586 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,414 IT Pros & Developers. It's quick & easy.

Database Locking

P: 31
Hi I want to know how can I lock my database...I mean if someone wishes to see he should be able to see only Database Name He should not be able to see tables,Sp's,UDF'S...I don't want to set permissions bcoz permissions can be changed by ADMIN...
May 15 '09 #1
Share this Question
Share on Google+
3 Replies


100+
P: 142
This is interesting question. Very useful if someone explain the possibilities.
May 15 '09 #2

ck9663
Expert 2.5K+
P: 2,878
They're called ADMIN because they can do anything. Being the highest user, you can not stop them from doing anything. If you can, that makes you the ADMIN which makes everything a cycle :)

Good luck


--- CK
May 15 '09 #3

prabirchoudhury
100+
P: 162
ok..

Set the database into single user mode so only one connection can access it

Expand|Select|Wrap|Line Numbers
  1.  
  2. sp_dboption 'databaseName', single, true
  3.  
  4. Set the database to readonly
  5.  
  6. sp_dboption 'databaseName', read only, true
that might solve problem..
May 16 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.