Display only Databases that a user has access to

It has always been an issue that when there are multiple databases in an environment that all of the databases can be viewed in Enterprise Manager as well as in the Query Analyser Database selection. If a user knows a database exists then they tend to be inquisitive, just like the folder on the network share called salary, a database called salary also invokes the thought “I wonder what is in here”. Although if the database is correctly secured a user will not have access, the ability to prevent casual inspection is beneficial.

The Microsoft SQL Server team have come up with an amendment to the sp_MSdbuseraccess Stored Procedure so that it only runs in the databases a user has access to. This fix was created to increase the responsiveness of Enterprise Manager when there are a large number of databases such as in a hosted environment. However this fix also has the benefit of only listing those databases that a user has access to.

For more details regarding the amended sp_MSdbuseraccess Stored Procedure refer to http://support.microsoft.com/default.aspx/kb/889696.