Solved

Linked server error

Posted on 2008-06-19
4
820 Views
Last Modified: 2008-06-25
I have set up linked server sucessfully.. i can see all the tables and views.. however, when I try to run a query I keep getting below error:

OLE DB provider "SQLNCLI" for linked server "Application1" returned message "Communication link failure".
Msg 121, Level 16, State 1, Line 0
Named Pipes Provider: The semaphore timeout period has expired.


How can I resolve this issue?
0
Comment
Question by:jung1975
  • 2
4 Comments
 
LVL 13

Expert Comment

by:rickchild
ID: 21823067
Check you are on MDAC 2.7, if not then install as this is the latest version.
Also have you tried linked server "SQL Server" rather than using the OLE DB data source?

If that doesn't help it sounds like hardware networking issues rather than SQL server issues.
Check out this link and see if you can ping the other server etc.

http://support.microsoft.com/default.aspx?scid=kb;en-us;827422
0
 

Author Comment

by:jung1975
ID: 21823254
does it matter what port number sql server is using it? The server that i am trying to linked using a different port number than default sql server port number..
0
 
LVL 13

Accepted Solution

by:
rickchild earned 250 total points
ID: 21823337
I assume not as you have managed to browse the tables, but make sure that the port is allowed in the firewall of the server, to allow in the server you are connecting from.

What query are you trying to run on the linked server?
Also in the linked server try changing RPC and RPC-OUT to be True.
0
 
LVL 51

Assisted Solution

by:Mark Wills
Mark Wills earned 250 total points
ID: 21824288
Yes, the port number does make a difference...

default port is 1433

when creating a linked server, need to specify in terms of : <servername>[\instancename],<port>    or   <ipaddress>[\instancename],<port>

both the linked server and the server need to understand what port number is being used. Now SQl Server can be configured to use dynamic ports, but, generally need to control what type of traffic and which ports you are using...

From Books On-Line :  To assign a TCP/IP port number to the SQL Server Database Engine:

In SQL Server Configuration Manager, in the console pane, expand SQL Server 2005 Network Configuration, expand Protocols for <instance name>, and then double-click TCP/IP.
In the TCP/IP Properties dialog box, on the IP Addresses tab, several IP addresses appear, in the format IP1, IP2, up to IPAll. One of these are for the IP address of the loopback adapter, 127.0.0.1. Additional IP addresses appear for each IP Address on the computer. Right-click each address, and then click Properties to identify the IP address that you wish to configure.
If the TCP Dynamic Ports dialog box contains 0, indicating the Database Engine is listening on dynamic ports, delete the 0.
In the IPn Properties area box, in the TCP Port box, type the port number you wish this IP address to listen on, and then click OK.
In the console pane, click SQL Server 2005 Services.
In the details pane, right-click SQL Server (<instance name>) and then click restart, to stop and restart SQL Server.
After you have configured SQL Server to listen on a specific port there are three ways to connect to a specific port with a client application:
        1)Run the SQL Server Browser service on the server to connect to the Database Engine instance by name.
        2)Create an alias on the client, specifying the port number.
        3)Program the client to connect using a custom connection string.
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question