Jump to content

[SOLVED] Cannot open user default database. Using master database instead.


TLawrence

Recommended Posts

I have a client who just recently started receiving the following error.

 

"Warning: mssql_connect() [function.mssql-connect.html]: message: Cannot open user default database. Using master database instead. (severity 11) in filename on line 2"

 

According to them, nothing has changed regarding their database, so what would typically cause this error to occur?  This is the first project I've done using MSSQL, so I'm not that familiar with the database software and I've never seen this error before.

Link to comment
Share on other sites

So more than likely something DID change on the client's side regarding the database, even though they're telling me nothing changed?

 

Can you explain the difference between a default database and master database?  What are their purposes and when/how are they created?  Wouldn't their IT person know if a default database no longer existed (db dropped)?  Or if permissions changed? 

Link to comment
Share on other sites

the master database is just the general system database that mssql needs.

 

ask the IT team what your default DB is set to

 

also, after you get the warning, can you select your DB, and query your data ok? if so, just put an @ in front of the function and ignore the warning. while it is good to fix it, it won't hurt to have a bad default db

Link to comment
Share on other sites

do you have the MSSQL Management Studio? you should be able to connect with that and look up your default db.

 

once in the management studo, and connected to your server, expand the 'Security' section, then the 'Logins' section. right click on your account and select 'Properties'. the default db will be on the main page that comes up.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.