Login failed for user - Microsoft SQL Server, Error: 4064


When I click on properties of a database, users, tables, or any object within SQL Server Management Studio, I get this error:

Cannot show requested dialog.
Cannot open user default database. Login failed.
Login failed for user 'PBTF\bob'. (Microsoft SQL Server, Error: 4064)

The login does exist in the security group. The database is a WSS 3.0 database, with an instance of MICROSOFT##SSEE

In the event log, the event occurs when the error message occurs in SQL Server Management Studio:

The description for Event ID ( 18456 ) in Source ( MSSQL$MICROSOFT##SSEE ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer.

I ran the following command and there were no errors. It seemed to work, but I tried viewing properties in Management Studio and the error still occurs:

C:\>sqlcmd -E -d master -S THOTH\MICROSOFT##SSEE
2> go

The error still occurs, any suggestions?


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
Try running the script below:

exec sp_defaultdb '[PBTF\Group - IT DB Admins]', 'master'

PS: Run this script from a user having sa rights or securityadmin role..
gtrappAuthor Commented:
Ran the script. It ran successfully. I closed down SQL Server Management Studio and reconnected to the MICROSOFT##SSEE. The 4064 error still occurs.
Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
If ALTER LOGIN didn't worked, then sp_defaultdb should have worked..
Even this is what is suggested in Microsoft Article:


Check this one out:


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

gtrappAuthor Commented:
OK, I think I need to call MS Support. Can't seem to fix the problem.
gtrappAuthor Commented:
rrjegan17 did a good job with the comments, but it did not sovle the problem. I need to call MS for help.
Raja Jegan RSQL Server DBA & Architect, EE Solution GuideCommented:
>> Can't seem to fix the problem.

Ok..And if you share the solution which you got from Microsoft once it is resolved, it would be helpful for others who might be visiting this thread later on..
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.