Hiding Database to perticular User

  • Hi All,

    I have 4 databases by names DB1,DB2,DB3,DB4.

    I created one user( Login : TestUser ) & granted access to database DB4. when logingin through TestUser I am able to see all databases. When I accessed DB1,DB2,DB3 getting error message as expected like " The database DB1 is not accessible."

    Is there any possibility to hide the databases from viewing to the user for which the user is not having access.

    Thanks for the help 🙂

    Pavan K

  • Right click on Your server -> Goto Permissions -> select the account that you are running and go to View Any database -> Click on Deny permission.

    Regards
    Hema.,

  • But that would also deny the DB he needs, though, right?

  • I think that will remove all databases.

    AFAIK, there is no way to prevent all the databases from appearing. They are all stored in a table in SQL and SSMS reads the table. There isn't row level security.

  • 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 / 2008 can see all databases in the instance.

    Sivaprasad S - [ SIVA ][/url]http://sivasql.blogspot.com/[/url]

  • that was Helpful information.

    Thanks all for your time.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply