Microsoft KB Archive/259561

= You receive a &quot;Cannot open user default database . Using master database instead.&quot; error message when you connect to a SQL Server database =

Article ID: 259561

Article Last Modified on 2/22/2007

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition
 * Microsoft SQL Server 2000 Standard Edition
 * Microsoft SQL Server 2005 Standard Edition
 * Microsoft SQL Server 2005 Express Edition
 * Microsoft SQL Server 2005 Developer Edition
 * Microsoft SQL Server 2005 Enterprise Edition
 * Microsoft SQL Server 2005 Workgroup Edition

-



This article was previously published under Q259561



SYMPTOMS
After you add a Microsoft Windows NT group as a SQL Server login you might see the following error message when you log on as a member of that Windows NT group, even if the group has permission to their default database:

Msg 4062 Severity 11 Cannot open user default database . Using master database instead.

If the client is using an ODBC or OLEDB-based connection, the client will not be able to log on to SQL Server as the error message suggests. If the connection is DB-Library-based, the client will be able to successfully log on to SQL Server and be in the master database.

196076 PRB: &quot;Cannot open default database . Using master instead.&quot;



CAUSE
The error message may occur if the Windows NT group or ANY other group of which you are a member meets one of these conditions:
 * The group does not have access to the database that is set as their default database.
 * The database that is set as the group's default database is in &quot;dbo use only&quot; mode.
 * The group's default database has been dropped.

If you are a member of a group that meets one of the previous conditions, the error message might occur regardless of how many valid groups in which you are a member.

These conditions are described in more detail in the article referenced in the &quot;Symptoms&quot; section of this article.



WORKAROUND
The System Administrator should correct the group login that meets any one of the conditions listed in the &quot;Cause&quot; section of this article.

For example, if you are a member of a group that does not have access to its default database, the system administrator should either give the group the correct permissions, or change the default database to a database to which the group has permission.

Keywords: kbprb KB259561

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.