ODBC - way to limit the list of databases?

  • Is there a way to limit the list of databases a user can see when they are setting up an ODBC connection to an instance?

  • There is no way to limit the user from seeing available databases on a particular instance via ODBC. You can restrict access to those databases through user security.

    Chris Powell

    George: You're kidding.
    Elroy: Nope.
    George: Then lie to me and say you're kidding.

  • simple CONNECT permissions give the user the ability to query sys.databases, which is where the user gets the ability to see all teh databases, even though they have no rights to do anything to them once they get there.

    there is a command that does what you want, but also has some side effects:

    DENY VIEW ANY DATABASE TO [SomeUserOrRole]

    that will prevent the user or role from seeing anything but master and tempdb, plus any database they are the owner of.(sp_changedbowner)

    that means unless the database is in the connectionstring they use, they could not see the database as part of a list, even if they were a user int he database.

    see this recent thread on the same issue:

    http://www.sqlservercentral.com/Forums/FindPost1180325.aspx

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 3 posts - 1 through 2 (of 2 total)

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