SQL Server - Hiding DB's that can't be accessed???

Associate
Joined
28 Nov 2004
Posts
1,237
Location
Birmingham
Hi guys,
I have a remote user connecting to our SQL Server and they only have accesss (read only) to one of the DB's on the server.
The read only side of it is fine. They can indeed only access the DB and not insert/update/delete.

The problem I have is that in Management Studio, when the user account connects to the server, it lists all the other DB's on there too.
The user doesn't have access to them but I don't want them listed either. Is there any way to stop this from happening???

Cheers!
 
Yes

In SQL Server 2005 it is possible with a new server side role that has been created. VIEW ANY DATABASE permission is a new, server-level permission. A login that is granted with this permission can see metadata that describes all databases, regardless of whether the login owns or can actually use a particular database. Please note By default, the VIEW ANY DATABASE permission is granted to the public role. Therefore, by default, every user that connects to an instance of SQL Server 2005 can see all databases in the instance.

Here is a link from Microsoft to help you:-

http://msdn2.microsoft.com/en-us/library/ms175808.aspx

This may help as well:-

http://blogs.msdn.com/euanga/archive/2006/05/04/585513.aspx

and here there seems a simple answer: -

http://forum.dotnetpanel.com/forums/p/3715/19223.aspx
 
Last edited:
Back
Top Bottom