SQL Server permissions question

Posted on 2011-04-25
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
    LVL 9

    Accepted Solution

    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

    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

    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

    OK, I finally got it working.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Suggested Solutions

    Title # Comments Views Activity
    SQL HELP 2 64
    Microsoft sql server 17 30
    SQL Query 2 44
    Start a field with integer 1 7 27
    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…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now