SQL Server permissions question

Posted on 2011-04-25
Medium Priority
Last Modified: 2012-05-11
We're running SQL Server 2008

I want to create a login and give it access to one database (which I did). But, when this login connects via Management Studio, they can see the names of the other databases. How can I hide even the ability to see what other databases exist?

Thanks in advance.
Question by:skbohler
  • 3

Accepted Solution

kaminda earned 1000 total points
ID: 35460053
This thread has an answer for your question


Create a user account (make sure its not mapped to any Database)
Right Click on the upper section of the SQL (SQLSERVER Name)>Properties>Permissions>Click on the user account, and select Deny to view databases.
Right Click on the newly created DB, Properties,Files, and change the Owner to the newly created account.

Author Comment

ID: 35460526
Thanks for your reply.

I have a couple of questions.

first, this is a user I've already created. I'm going to delete it.

What is the proper order for creating a user.

Do I first create a Login under Security, then add that user under Users for the database?

How do I "change the Owner" of the database to the new account?

Author Comment

ID: 35460881
OK, I think I followed the instructions properly.

However, even though the user is the db_owner of the database, when they login, they can see no databases now.


Author Comment

ID: 35460928
OK, I finally got it working.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question