example for Connecting by server name to a named instance

http://msdn.microsoft.com/en-us/library/ms189307.aspx has this syntax as example:
\\<servername>\pipe\MSSQL$<instancename>\SQL\query

how does that actually look? should i just use the word 'pipe'?

LVL 5
25112Asked:
Who is Participating?
 
Kevin CrossChief Technology OfficerCommented:
Preference. As you see, named pipes will work. Might be old habit of mine as I have always used TCP for remote connectivity and named pipes locally, so never really tried it any other way for about 10+ years. :)
Given my starting to use TCP/IP predominantly for remote connectivity, this old MSDN probably applies: http://msdn.microsoft.com/en-us/library/aa178138(v=sql.80).aspx

It details some of the networking differences. As a system admin, many of my servers were always over WANs going through routers, so using TCP/IP worked well. As I said, I have not used named pipes enough to judge it fairly. ;)
0
 
25112Author Commented:
the server i am trying to connect through linked server is on a cluster and is called
PIP007/SPL7
0
 
25112Author Commented:
right now, i am putting the servername as PIP007/SPL7
but http://support.microsoft.com/kb/888228 says i should put it differently because it is on a cluster.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Metehan OzculluSQL Service ManagerCommented:
"DRIVER=SQL Native Client;Trusted_Connection=Yes;SERVER="np:Servername\Instancename" works for tursted named pipe connection
0
 
Metehan OzculluSQL Service ManagerCommented:
for cluster it should be:
"DRIVER=SQL Native Client;Trusted_Connection=Yes;SERVER="np:SQLServerVirtualName \Instancename"
0
 
25112Author Commented:
ServerName\InstanceName is PIP007\SPL7; is that not the same as :SQLServerVirtualName \Instancename?

what is the significance of the syntax recommended here:
\\<servername>\pipe\MSSQL$<instancename>\SQL\query
0
 
Kevin CrossChief Technology OfficerCommented:
Dan, the syntax you are showing is for named pipes. Typically, especially with clusters, TCP/IP connectivity is what is used. Therefore, ServerName\InstanceName format.

As noted by http:#36980245, the server name in this instance is actually the virtual one defined by the cluster. Are you sure you are wanting to use named pipes? That might be the reason it is failing.
0
 
Kevin CrossChief Technology OfficerCommented:
As you will see in the link you provided, it speaks to the fact that what happens in a cluster is the client tries to connect on a virtual IP address which reaches the correct active node that responds. This response originates from the active node's real IP address and so fails discovery phase of the communication. It states the correct form for named pipes is:

Data Source=np:\\ServerName\pipe\MSSQL$InstanceName\sql\query

So you would fill this in as:
Data Source=np:\\PIP007\pipe\MSSQL$SPL7\sql\query

If PIP007 represents the virtual server name.
0
 
25112Author Commented:
>>Typically, especially with clusters, TCP/IP connectivity is what is used.
is that mandatory or preferred?
0
 
25112Author Commented:
got it! Thanks much for your helping out
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.