Showing posts with label localhost. Show all posts
Showing posts with label localhost. Show all posts

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 use
r 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.sql

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.

Friday, February 24, 2012

Can't connect using 'localhost' but '127.0.0.1' works

I'm trying to connect to SQL Server using the string 'localhost', but I
always get a timeout error using either Query Analyzer or ADO. But if I
change the string to 127.0.0.1, it works.
A 'nslookup localhost' returns 127.0.0.1. If I run 'telnet localhost
1433', it connects. Any idea why I might not be able to use the string
'localhost'?
Thanks,
PatrickI'm sorry, I posted this to the wrong group, but if anyone has the
answer, please let me know.
Thanks,
Patrick

Can't connect using 'localhost' but '127.0.0.1' works

I'm trying to connect to SQL Server using the string 'localhost', but I
always get a timeout error using either Query Analyzer or ADO. But if I
change the string to 127.0.0.1, it works.
A 'nslookup localhost' returns 127.0.0.1. If I run 'telnet localhost
1433', it connects. Any idea why I might not be able to use the string
'localhost'?
Thanks,
Patrick
I'm sorry, I posted this to the wrong group, but if anyone has the
answer, please let me know.
Thanks,
Patrick

Can't connect to SQL Server Express 2005 using localhost in the connection string.

However it works perfectly if I specify the full server name like this
192-55-55-55\SQLEXPRESS.
Is there any way to configure it so I would be able to connect to it using
localhost?
Thank you,
VladTry using . (dot) as in .\SQLEXPRESS. localhost may or may not be
configured.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Vlad Kryvokobylsky" <vlad.kryvokobylsky@.denovosoftware.com> wrote in
message news:%23jqbiTOCHHA.4892@.TK2MSFTNGP04.phx.gbl...
> However it works perfectly if I specify the full server name like this
> 192-55-55-55\SQLEXPRESS.
> Is there any way to configure it so I would be able to connect to it using
> localhost?
> Thank you,
> Vlad
>|||Local host is set up properly, since I can use it in IE.
The idea is to avoid using a server instance name. Just an IP address.
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
news:ek4NI$OCHHA.4844@.TK2MSFTNGP02.phx.gbl...
> Try using . (dot) as in .\SQLEXPRESS. localhost may or may not be
> configured.
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Vlad Kryvokobylsky" <vlad.kryvokobylsky@.denovosoftware.com> wrote in
> message news:%23jqbiTOCHHA.4892@.TK2MSFTNGP04.phx.gbl...
>

Can't connect to SQL Server Express 2005 using localhost in the connection string.

However it works perfectly if I specify the full server name like this
192-55-55-55\SQLEXPRESS.
Is there any way to configure it so I would be able to connect to it using
localhost?
Thank you,
Vlad
Try using . (dot) as in .\SQLEXPRESS. localhost may or may not be
configured.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Vlad Kryvokobylsky" <vlad.kryvokobylsky@.denovosoftware.com> wrote in
message news:%23jqbiTOCHHA.4892@.TK2MSFTNGP04.phx.gbl...
> However it works perfectly if I specify the full server name like this
> 192-55-55-55\SQLEXPRESS.
> Is there any way to configure it so I would be able to connect to it using
> localhost?
> Thank you,
> Vlad
>
|||Local host is set up properly, since I can use it in IE.
The idea is to avoid using a server instance name. Just an IP address.
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
news:ek4NI$OCHHA.4844@.TK2MSFTNGP02.phx.gbl...
> Try using . (dot) as in .\SQLEXPRESS. localhost may or may not be
> configured.
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Vlad Kryvokobylsky" <vlad.kryvokobylsky@.denovosoftware.com> wrote in
> message news:%23jqbiTOCHHA.4892@.TK2MSFTNGP04.phx.gbl...
>

Friday, February 10, 2012

Cant connect remotely to SQL Server

I just reinstalled SQL Server and after reattaching my databases, I can't connect remotely. If I use "localhost" in my connection string it works fine, but I can't register my remote Enterprise Manager this way.

I have looked around and made sure that my SQL Server installation has the same name as my computer and I checked the networks settings for SQl Server and it says it is using port 1433 (as expected?). I can't ping port 1433, nor can I connect if I put :1433 in the connection string (is that normal?) I am no network expert so I am not sure of the expected behaviours. I am digging through the Internet for a solution (Microsoft Support is a bit pricy to be anything but a last resort for us), but I thought I would ask here in case someone has a suggestion.

Any help is appreciated.

SP4 was not installed properly, so SQL Server was not listening on port 1433. All fixed now!