August 23, 2007 at 2:30 pm
I am at a loss. I am recieving this message Cannot open user default database. Login failed. through an application. The login is a SQL Server Login and it can connect to the database directly in Management Studio and execute the stored procedure. I have checked all of the groups it belongs to as well as the login itself and the default database exists. We failed over a database this morning from a different database that this user is also a part of but it is not the default database. Anyone have any thoughts?
August 23, 2007 at 2:53 pm
I ran into this in a certain scenario where the login at the server level was not properly mapped to the SID of the user in the database. What you can do is use the stored procedure sp_change_users_login to fix the mapping between the login and the user and see if that works. Otherwise you might try changing their default database.
August 23, 2007 at 2:54 pm
Already tried all of that. Still isn't working
August 23, 2007 at 3:27 pm
Change the users default database to master.
I always make master the default database for all users.
August 23, 2007 at 3:35 pm
I always make tempdb the default database for all users
* Noel
August 23, 2007 at 3:36 pm
Sounds to me like you have an orphaned user. MSDN has a buncha info on them.
Take a look at this: http://support.microsoft.com/kb/314546/
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply