May 23, 2007 at 3:01 am
Hi,
One of the application guys are configured an ODBC connection to a particular server. He switched back to another server, but now he's getting the following error when he is trying to configure again:
Connection failed
SQLState: '4200'
SQL Server Error: 4064
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open user default database. Login failed.
Can you please help. I have not changed anything on the databases, I have just restored them. I don't think this could be the problem.
May 23, 2007 at 5:14 am
Make sure that his defaultdb is master, and that he has access to it (at least public), and of course access to the db he wants to connect to. That should give him back access to the system.
May 23, 2007 at 7:01 am
Did the user in the database you restored (I'm assuming that is the users default database) get synched with the login?
May 23, 2007 at 3:41 pm
sp_change_users_login 'auto_fix', 'yourlogin'
Run the above statement in the restored database.
May 6, 2008 at 5:12 pm
I just had a similar error message but it was happening when I tried to open Management Studio to an instance where I had just deleted a test database (just happened to be the default database for the NT group used by my login). When I logged in under sa (default = master) and checked the properties of the NT Login group the default database was blank. I picked another database and the NT login works.
April 4, 2022 at 9:05 am
This was removed by the editor as SPAM
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply