May 15, 2006 at 1:12 pm
Hi,
It's amazing, I am administrator of my server.
I would like to put my dataBase in Off Line and juste after I have this message :
Cannot connect to SRV1\MyInstance.
Cannot open user default database. Login failed.
Login failed for user 'SRV1\Administrateur'. (Microsoft SQL Server, Error: 4064)
It's very stange, my other database in this instance works correctly.
But I don't know why I can't to connect to my instance 'SRV1\MyInstance'. I can't to administrate my database.
Thanks for your time.
degrem_m
Degremont
May 16, 2006 at 11:10 am
Good Morning,
This could be too obvious but I still want to point our...
'SRV1\Administrateur' ....should it be 'SRV1\Administrator' ??
May 17, 2006 at 10:43 pm
I guess you are running a foreign language version of windows so no probs there. The actual error message indicates that you can connect to SQL Server but the default database for your user does not exist (is it the one you detached) so it will not let you log in. Can you connect via another account and change your default DB to master or reattach the missing DB?
I've never been in this pickle, but you could try specifying the DB as part of your connection. Eg, with the osql utility you could connect as
osql -E -S [server] -d master
Does that work?
May 18, 2006 at 3:00 pm
If I use :
I made Start >> Run... >> CMD
In prompt I wrote :
C:\Program Files\Microsoft SQL Server\90\Tools\Binn>sqlcmd –E -S myInstance –d master
1>ALTER LOGIN server\windowslogin WITH DEFAULT_DATABASE = anotherdatebase
2>GO
It doesn't work. I have this message : error syntaxe "\" near windowslogin
But I try with sql login and its works with :
C:\Program Files\Microsoft SQL Server\90\Tools\Binn>sqlcmd –E -S myInstance –d master -U SQLLogin -P Password
1>ALTER LOGIN SQLLogin WITH DEFAULT_DATABASE = anotherdatebase
2>GO
How can I do ?
I help me with http://msdn2.microsoft.com/en-US/library/ms189828.aspx
degrem_m
Degremont
May 22, 2006 at 2:02 am
I don't have a copy of SQL 2005 installed near me at the moment, but perhaps you need to put the DOMAIN\USERNAME in square brackets, such as
ALTER LOGIN [DOMAIN\USER] WITH DEFAULT_DATABASE = anotherdatebase
Sorry cannot be of more help - am still brushing up on 2005 syntax
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply