Login failed for user - Microsoft SQL Server, Error: 4064
Hello,
I am working with a SQL Server instance for WSS 3.0, SLQ Server 9.0.4035, MICROSOFT##SSEE. 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\user. (Microsoft SQL Server, Error: 4064)
I am attempting to reset the default database with a valid login, but having problems.
When I run the following, I get an error saying "Line 1: Incorrect syntax near 'LOGIN'."
C:\>sqlcmd -E -d master1> ALTER LOGIN [PBTF\Group - IT DB Admins] WITH DEFAULT_DATABASE = master2> goMsg 170, Level 15, State 1, Server THOTH, Line 1Line 1: Incorrect syntax near 'LOGIN'.
The user that is logging into the SQL Server is in a secuirty group. The security group has DB Admin rights at the SQL Server level.
I also have the master database for the connect to database in the Connection Properties tab.
I have other SQL Server instances on the server as well.
SQL Server 8.0.2055 (Standard edition)SQL Server 8.0.760 (MSDE)SQL Server 9.0.4053 (Express Edition)
If I am using the sqlcmd, how do I ensure I am using the correct instance?
Is the ALTER LOGIN command availble in this instance?
How else can I resolve this error?
Project Manager
March 26th, 2010 7:57pm
Hi,
This is a SQL server issue. You’d better turning to the SQL server forum.
Here are some related sources:
http://blog.sqlauthority.com/2008/11/04/sql-server-fix-error-4064-cannot-open-user-default-database-login-failed-login-failed-for-user/
http://geekswithblogs.net/clemmon/archive/2006/08/25/89327.aspx
http://social.msdn.microsoft.com/Forums/en/sqldatabaseengine/thread/1f85a687-a786-46ad-af75-2b7d829e2193
Let me know if you have further questions!
Hope it is helpful!Seven
Free Windows Admin Tool Kit Click here and download it now
March 30th, 2010 12:06pm