Sunday, February 19, 2012

HIding databases that a user does not have permission to

I remember reading a blog post which showed you how to hide databases other than the ones the current user has permission to see. My ISP is getting a lot more SQL 2005 databases on the server and I would like to encourage them to only show me mine in Management Studio rather than the huge list I have to scroll down. Is this possible?

(the blog post *may* have been for SQL 2000 but I'm looking for a SQL 2005 solution)

Yes, there have been some recent discussions about this. You need to revoke the permission 'VIEW ANY DATABASE' from the role PUBLIC (and then grant it to any server principal who should have it but don't get it by default). Credit to Kalen Delaney and Dan Guzman who pointed this out... wrote in message news:b45aadf8-59d9-4531-9ba7-dac473bbcade@.discussions.microsoft.com... >I remember reading a blog post which showed you how to hide databases
> other than the ones the current user has permission to see. My ISP is
> getting a lot more SQL 2005 databases on the server and I would like to
> encourage them to only show me mine in Management Studio rather than the
> huge list I have to scroll down. Is this possible? >
> (the blog post *may* have been for SQL 2000 but I'm looking for a SQL
> 2005 solution) > > >
>

No comments:

Post a Comment