Solved

Linked server error

Posted on 2008-06-19
4
814 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
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…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now