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 master
1> ALTER LOGIN [PBTF\Group - IT DB Admins] WITH DEFAULT_DATABASE = master
Msg 170, Level 15, State 1, Server THOTH, Line 1
Line 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?
This is a SQL server issue. You’d better turning to the SQL server forum.
Here are some related sources:
Let me know if you have further questions!
Hope it is helpful!
- Marked as answer by Seven M Friday, April 02, 2010 10:21 AM