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 2> go 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?
Changed typeMike Walsh FINFriday, March 26, 2010 5:24 PMalways use the Question Type so people get credit for their replies
Edited byMike Walsh FINFriday, March 26, 2010 5:25 PMWSS 3.0 database: removed. Unnecessary as WSS 3.0 and MOSS 2007 are defaults here. Don't use prefixes.
Microsoft is conducting an online survey to understand your opinion of the Technet Web site. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.