Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an SQL Server with several users and databases. The permissions are imho simple:

  • user1 is db_owner of user1_db1
  • user2 is db_owner of user2_db1
  • user3 is db_owner of user3_db1
  • user3 is db_owner of user3_db2

If a user logs in to the server with Management Studio, he sees all databases. He has no rights on it (obviously OK). But he sees them. Which is not optimal.

How can I setup the SQL Server, that when a user logs in, he only gets the databases in which he is db_owner?

share|improve this question

See Hide SQL database from Management Studio on stackoverflow (why it's there is beyond me but the taxonomy here is bizzare to say the least)

share|improve this answer
That doesn't work. If I revoke the VIEW ANY DATABASE rights from role "public", it hides all databases from all users. I think that is because all users are in the "public" server role. – Remy Nov 16 '10 at 15:45
yes users can only see databases they are the owner of. I tried the instructions in this answer ande they seemed to work for me:… – Jim B Nov 18 '10 at 13:01

You can Deny access to see them for your instance via Server Properties/ Permissions/ and set deny for login for View Any Database right.

Hope this helps :)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.