Tuesday, March 20, 2012

Cannot open database requested in login . Login fails.

Hey gang. Trying to figure out where to start troubleshooting this error message while my boss (he who is better with SQL Server than I am) is on vacation. Can someone point me in the right direction?

I'm getting the "Cannot open database requested in login '--'. Login fails." error on a query to a MS-SQL database in a ColdFusion app. Can't even make it go with the sa user. I know the login and password are just fine; when I give it a different, incorrect password, the error message is different ("Login failed for user 'sa'."). Also, I'm able to get into the console and run my query via Enterprise Manager with no problem.

For what it's worth, my boss re-created this database right before he left and I'm thinking he just missed setting a property somewhere; on the old version of the database this ColdFusion page and this query worked fine under the same username/pass.

Any suggestions? Hope this isn't too incoherent.Are you connecting via ODBC? I sometimes get this error message if the default database is improperly set in the ODBC source.

Dirk|||Via a ColdFusion ODBC datasource--all the settings there look good.|||Hey Sapphireblue,

This article can be helpful, I experienced the same problem with my app.
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B283860

No comments:

Post a Comment