Tuesday, March 20, 2012

Can't expand localhost icon...

Hi all,
Something that should have been straightforward turned out to be rather
problematic. Thankfully this is only a test machine. SQL Server 2000 Dev
Edition on XP Pro.
I detached a [BLAH] database file with Enterprise Manager, deleted the
corresponding BLAH.MDF/.LDF files, copied newer versions of those files from
another machine where the old files used to be, then was going to reattach
as usual with the following sequence:
Reload SQL Server Enterprise Manager
Expand Microsoft SQL Servers
Expand SQL Server Group
Try to expand (local)
At this point I got the following:
"Unable to connect to server localhost: Server: Msg 4064, Level 16, State 1
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open user default
database. Login failed."
WTF? I didn't delete any other file, or detach any other database...I'm
ruling out any problem with the newer .MDF/.LDF files, because I'm not even
getting to the point where I can even try to reattach.
Ideas?
Argh...never mind...I just found Q307864. No clue why Google failed to
return it the first time around (*before* I posted my original question)...
I still have no idea though why the problem started...
|||Homer,
That error message is normal.Iam assuming that the login uses the same
database that you detached, as the default one.While you were connecting to
the server through EM, the login failed since the default database was not
online.
Use master as default database to avoid situations like this.
Dinesh
SQL Server MVP
--
SQL Server FAQ at
http://www.tkdinesh.com
"Homer J. Simpson" <root@.127.0.0.1> wrote in message
news:uRT3WfsLEHA.644@.tk2msftngp13.phx.gbl...
> Hi all,
> Something that should have been straightforward turned out to be rather
> problematic. Thankfully this is only a test machine. SQL Server 2000 Dev
> Edition on XP Pro.
> I detached a [BLAH] database file with Enterprise Manager, deleted the
> corresponding BLAH.MDF/.LDF files, copied newer versions of those files
from
> another machine where the old files used to be, then was going to reattach
> as usual with the following sequence:
> Reload SQL Server Enterprise Manager
> Expand Microsoft SQL Servers
> Expand SQL Server Group
> Try to expand (local)
> At this point I got the following:
> "Unable to connect to server localhost: Server: Msg 4064, Level 16, State
1
> [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open user default
> database. Login failed."
> WTF? I didn't delete any other file, or detach any other database...I'm
> ruling out any problem with the newer .MDF/.LDF files, because I'm not
even
> getting to the point where I can even try to reattach.
> Ideas?
>
|||"Dinesh T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message
news:%23tKHyvtLEHA.892@.TK2MSFTNGP09.phx.gbl...
> Homer,
> That error message is normal.Iam assuming that the login uses the same
> database that you detached, as the default one.While you were connecting
to
> the server through EM, the login failed since the default database was not
> online.
> Use master as default database to avoid situations like this.
It's very possible this is the case--I can't remember...however I use this
particular database almost exclusively on this test machine, so I can see
how I might have changed the default at some point...
|||Hi Homer,
I am reviewing your post now. I want to know that after you change the
default database of all users to MASTER, is the problem resolved? Please
feel free to let us know that if you still have any problem. We are glad to
help.
Thanks.
Best regards
Baisong Wei
Microsoft Online Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.

No comments:

Post a Comment