What is (local)?

Leave a comment

April 27, 2020 by Kenneth Fisher

When connecting to a SQL Server instance sometimes you’ll see (local), localhost or even just a single period (hard to display here in an obvious way).

And what those are is pretty simple. It’s an alias for the local server you are on. Note, that is not the instance, just the server. That means if you are using a named instance you need to include the instance name, and of course if you are using the default instance (or port TCP 1433) you don’t. So for example for the instance MyInstance you would use the following regardless of the server name.

(local)\MyInstance

I do want to repeat one important fact. This only works if the instance you are connecting to is actually on the machine you are connecting from. I’ve run a few tests and this also works with Azure Data Studio and connection strings. I should probably point out that I don’t like using these. I would rather actually see the name of the server listed. Now, maybe if you have a connection string and you plan on moving it up the SDLC (systems development life cycle) stack (dev, test etc) and don’t want to change the file when it’s being moved I could see it but that’s about it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 3,116 other followers

Follow me on Twitter

ToadWorld Pro of the Month November 2013
%d bloggers like this: