Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

2 Answers

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: stackoverflow.com/questions/935018/… –  Jim B Nov 18 '10 at 13:01
add comment

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
add comment

Your Answer

 
discard

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.