SQL Server Connection Strings – dot(“.”) or “(local)” or “(localdb)”

. and (local) and YourMachineName are all equivalent, referring to your own machine.

(LocalDB)\instance is SQL Server 2012 Express only.

The other parts are depending on how you install – if you install with an instance name – then you need to spell that instance name out (SQL Server Express by default uses the SQLEXPRESS instance name, while other editions of SQL Server will try to use the default instance without any special name).

So for a “normal” SQL Server installed with all default options on your local machine, use

.    or   (local)     or          YourMachineName

For SQL Server Express installed with all the default settings, use

.\SQLEXPRESS    or   (local)\SQLEXPRESS     or          YourMachineName\SQLEXPRESS

If you look at the SQL Server Configuration Manager (launch it from the start menu), you’ll see:

enter image description here

If the SQL Server entry reads (MSSQLSERVER) then that’s that default instance (without any name) – otherwise you’d see the instance name in brackets

Leave a Comment