Is there a difference between (local), '.' and localhost? Is there a difference between (local), '.' and localhost? sql-server sql-server

Is there a difference between (local), '.' and localhost?


The final result is the same. The difference is:

  • 'localhost' resolves at the TCP/IP level and is equivalent to the IP address 127.0.0.1
  • Depending on the application "(local)" could be just an alias for 'localhost'. In SQLServer, '(local)' and '.' mean that the connection will be made using the named pipes (shared memory) protocol within the same machine (doesn't need to go through the TCP/IP stack).

That's the theory. In practice, I don't think there is substantial difference in performance or features if you use either one of them.


They are generally synonyms. However, it depends on the application you are configuring. As long as the app understands what you mean, it shouldn't result in a performance loss. At least, not one you have to root out prematurely, if you get my drift.


As far as I know the dot "." and "local" are windows application terms, not a "standard" term, localhost resolves to 127.0.0.1 in the TCP/IP level so if you want to make sure you are "compatible" across platforms you should use either localhost or 127.0.0.1