开发者

SQL (local) does not work

I've got a problem with fresh install of SQL Server.

ConnectinString:

Data Source=(local);Initial Catalog=S开发者_JAVA技巧GGW.USS;Integrated Security=SSPI;Pooling=false

but this works

Data Source=.\EOGSQL;Initial Catalog=SGGW.USS;Integrated Security=SSPI;Pooling=false

EOGSQL is my local machine only running SqlServer Database

EOG


(local) is actually a keyword and not a specific reference to the local machine (although it seems that way sometimes by how it is used). Here is more information about what it really means:

http://blogs.msdn.com/b/sql_protocols/archive/2008/09/19/understanding-data-source-local-in-sql-server-connection-strings.aspx

In your case, the issue is that (local) refers to the machine and default instance while .\EOGSQL refers to an instance on your local machine (local machine is designated by the period). Basically, this is working as intended.


The problem is that you have installed SQL SERVER on a named instance instead of using the default instance ( local or .)

Hope this helps


You have a Named Instance, so the connection string must be MachineName\InstanceName, or ip instead of machine name for that matter.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜