Groups | Blog | Home
all groups > sql server connect > august 2003 >

sql server connect : Cannot open default database


Dwayne
8/21/2003 4:35:22 PM
We have a datbase application that receives the following
error:

Cannot open default database '<ID>'. Using master database
instead.

This error happens inconsistently when accessing different
parts of the database, and if you close the current screen
and open it again you might not get the error.

The KB refers to permissions but this application has been
running fine and this just starting to happen. In
addition, all clients use the same sql login.

Narayana Vyas Kondreddi
8/22/2003 1:13:12 PM
Did you recently delete and recreate or rename your application database?
What basically is happening is, the sql login has been assigned a default
database, but that database is no longer there on the server.

You could use sp_defaultdb to change the default database for a login.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
What hardware is your SQL Server running on?
http://vyaskn.tripod.com/poll.htm


[quoted text, click to view]
We have a datbase application that receives the following
error:

Cannot open default database '<ID>'. Using master database
instead.

This error happens inconsistently when accessing different
parts of the database, and if you close the current screen
and open it again you might not get the error.

The KB refers to permissions but this application has been
running fine and this just starting to happen. In
addition, all clients use the same sql login.

Could this be network related at all?

AddThis Social Bookmark Button