Hiding MS SQL 2000 databases in Enterprise Manager

  • I work for a company that offers web hosting services. We are interested in showing for each SQL Server 2000 login only the databases for which he/she has access and hide the rest of them in Enterprise Manager. Is there a way to hide the databases for which a login doesn't have permissions to access?

  • No, you can't hide user databases in Enterprise Manager.  You can create a named instance for each customer or you can provide a front-end app that only shows the customer's database.

    Greg

    Greg

  • I figured out it wasn't possible, but I wanted to be sure.

    Thanks a lot Greg!!!

  • Thank you very much Tim, it worked!!!!!!!!

  • I stand corrected.  Now that I've looked at sp_MSdbuseraccess and the MS article, I understand how it works.  Tim, does your modification hide databases with the guest user, also?  That's what it looks like, but I wanted to be sure. 

    YukonDR, the caveat about modifying a system stored procedure is that it might be undone by an upgrade or hotfix, so be aware of that.

    Greg

    Greg

  • It should hide the databases with DB_ID less than 5 even if they have the guest user in them unless the user is in a server role.

    I have not every used my code in production, I just wrote it and tested it on a test server and it worked OK when I read the newgroup post from a while back.

    Tim S

  • Thanks for the explanation.  This must be run when a user starts Query Analyzer also because I don't see all databases in the object browse when I log on as a user with limited access.

    Greg

     

    Greg

  • Thank you guys for the valuable information!!

    YukonDR

Viewing 9 posts - 1 through 8 (of 8 total)

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