Unable to connect to SQL server 2008 R2 via Instance name?

我的梦境 提交于 2019-12-02 04:50:58

问题


I don't understand :

I've installed sql server 2008 R2. the installation process asked me for the desired instance name , so I wrote: MSSQLSERVER.

after the installation , running Setup Discovery Report does shows me the instance name :

I've also installed all the service packs.

Also , all the services are up :

Also , all the ports are open ( tcp:1433 + udp :1434)

Also , Named pipes are on :

So , where is the problem ?

I'm unable to connect via the instance name :

Also unable with :

user\MSSQLSERVER where user is the computer name.

Also unable with : .\MSSQLSERVER

But (weird) :

Those 4 do work : (when I try to connect to them)

  • user ( "user" is my machine name)
  • (local)
  • .
  • localhost

Question :

why I can't use my instance name to connect to my sql server ?

Related info :

After connecting via one of the 4 who work , I run a helpful info :

p.s. to be honets , I also asked this question in dba's stack site. ( cause I didn't know to which it more related)


回答1:


You are trying to connect to default instance of SQL Server. And for that you don't connect to instance using instance name but rather server name.

So for example if your machine name is DBServer and you are using default instance MSSQLSERVER, then you can simply connect to that instance either by specifying server name DBServer or (local) or . (just a dot)



来源:https://stackoverflow.com/questions/16265642/unable-to-connect-to-sql-server-2008-r2-via-instance-name

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