Cannot Connect to Default Database - by Henri Hein

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 387121 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 12/8/2008 6:47:51 PM
Access Restriction Public


In SQL Server 2008 Management Studio, follow these steps:
Connect to a database server with multiple databases with different permissions.  
Use SQL Server authentication.  (I don't know if it reproduces with Windows native authentication).
Speficy the correct credentials for at least one of the databases, where at least one of the databases is not accessible by those credentials.  
Specify the default database to connect to.

After connecting, in Object Explorer, expand the 'Databases' tree.


An error like this:

"TITLE: Microsoft SQL Server Management Studio

Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)

For help, click:


An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)


Server user 'myuser' is not a valid user in database 'otherdb'. (Microsoft SQL Server, Error: 916)

For help, click:"

To be able to connect to the database I listed as default, to which I have permissions.

This worked in SQL Server 2005.
Sign in to post a comment.
Posted by Atul Dhiman on 1/17/2012 at 10:04 PM
I am having some problem of not opening database in SQL 2008 management studio. It is saying "FAILED TO RETRIEVE DATA FOR THIS REQUEST".
And error no - 916.
Posted by Atul Dhiman on 1/17/2012 at 10:03 PM
I am having some problem of not opening database in SQL 2008 management studio. It is saying "FAILED TO RETRIEVE DATA FOR THIS REQUEST".
Posted by Microsoft on 6/2/2011 at 3:48 AM

We took a look at this bug along with several others recently. We are already tracking this issue through another connect bug (ID: 354291). Hence closing this bug as a duplicate.

Thanks for writing in to Microsoft.

Posted by Henri Hein on 1/27/2009 at 3:22 PM
Great, thanks Bill! That worked.
Posted by Microsoft on 1/23/2009 at 12:22 PM
Hi Hank,
    It looks like we have a workaround. As the database owner connection, click on the Databases node in OE and then press F7 to call up the Ojbect Explorer Details window. You'll get the nasty error indicating not enough permissions that you can ignore. For each column header in the Details list with the exception of name, right click on the column and deselect it from the list. When you are left with Name, press Refresh for the Databases folder in OE and you should see the complete list of databases. You can then navigate to the specific database that the user owns and perform SSMS operations against that database.
Thank you,
Bill Ramos
Posted by Microsoft on 1/2/2009 at 10:19 AM
Hi Hank,
Thank you for your feedback regarding using a low priveledged user account with SSMS. It terns out with 2008, you don't even have to include the default db specification to have the problem. When SSMS enumerates the DBs, it makes a query for meta-data using the low priv id. If the user account doens't have any permissions to any other DB, the error occurs. There is no workaround for the low priv user - eventhough they own a database they should be able to work with. We will look into this for a future update to 2008.
Thank you,
Bill Ramos