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

不问归期 提交于 2019-11-26 18:55:00

. 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:

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!