0

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?

Remy
  • 1
  • 1
  • 1

2 Answers2

1

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)

Jim B
  • 24,081
  • 4
  • 36
  • 60
  • 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: http://stackoverflow.com/questions/935018/hide-sql-database-from-management-studio/1430615#1430615 – Jim B Nov 18 '10 at 13:01
0

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 :)

Mark Broadbent
  • 399
  • 1
  • 4