Blog Post

What is (local)?

,

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.

Original post (opens in new tab)
View comments in original post (opens in new tab)

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating