difference between localhost and (local)

  • What exactly is the difference beween localhost and (local)????

    I installed Sql Server 2000 on two different machines. I followed the default installation on both (at least I'm not aware of anything that I did differently on each machine. On one machine connecting to localhost works fine but not on the second. Seeing examples that sometimes use (local) rather than localhost in the connection string I used that. Whoa, it worked !!! But why? I thought well maybe localhost did not work because there was no entry in etc/hosts. Checked that and it looked fine. Hmmm? What is going on???

    The second question is how to configure so that localhost works in the second machine. And BTW this is a development machine. Many, many examples use localhost in the connection strings so that is why I want to change it from (local) which it is now to localhost.

  • is tcp/ip enabled to be used for sqlserver ?

    If I'm correct (local) uses namedpipes

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • (local) would be a SQLServer term that referrs to the current machine.  I'd expect it to use the preferred connection method (TCP/IP or Named Pipes depending on the install).

    localhost is a TCP/IP term, but that doesn't force it to use TCP/IP instead of Named Pipes (just for fun)

    I expect that the reason that it's not working on the Dev machine is that the sqlserver on the dev machine has either 1) TCP/IP or Named Pipes turned off, or the more likely is that there is a firewall on the dev machine (this includes RPC/Named Pipes patches that microsoft release weekly).

    All-in-all you should rather be using (local) as it will work more often.

  • Still a mystery!!!

    I installed on two machines. One installed as (local) and the other as localhost. When I look at the client network utility both looked the same, i.e. TCP/IP listed first then Named Pipes. Both have the same entry in etc/hosts. I can ping localhost on both machines sucessfully. I tried to connect via osql IT FAILS on the (local) configured sql server. However, on this same machine isql connects fine, huh! Apparently the two command line utilties connect differently.

  • try using a dot .

    let us know wat happens wen u use . on both the machines.

  • Any kind of resolution on this, becuase I am having the same issue.  I cannot connect to localhost through isql, Query Analyzer or any other tool.  I can connect to (local), 127.0.0.1, or with my computer name.  It is really weird and I have had a couple other techies looking at, but they cannot figure it out.  I am using JBoss as an app server and I cannot to that using a local DB either.  All remote DB's work fine.  Please help.

    Thanks

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply