Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Error creating a Linked server Expand / Collapse
Author
Message
Posted Tuesday, December 2, 2008 4:42 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Sunday, November 16, 2014 8:25 PM
Points: 72, Visits: 252
Hi,

I am getting the following error while accessing data from SQL Server 2000 from SQL Server 2005.

OLE DB provider "SQLNCLI" for linked server "hqserver" returned message "Communication link failure".
Msg 10054, Level 16, State 1, Line 0
TCP Provider: An existing connection was forcibly closed by the remote host.
Msg 18456, Level 14, State 1, Line 0
Login failed for user 'netstats'.

I tried connecting from SQL Server Management Studio and I was able to connect using the netstats user id and execute queries against the database.

But if I execute the same query from using the linked server, I get the mentioned error.

Any help is much appreciated.

Cheers
Post #611952
Posted Tuesday, December 2, 2008 5:18 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, October 7, 2011 1:41 AM
Points: 346, Visits: 534
Mohammed Imran Ali (12/2/2008)
Hi,

I am getting the following error while accessing data from SQL Server 2000 from SQL Server 2005.

OLE DB provider "SQLNCLI" for linked server "hqserver" returned message "Communication link failure".
Msg 10054, Level 16, State 1, Line 0
TCP Provider: An existing connection was forcibly closed by the remote host.
Msg 18456, Level 14, State 1, Line 0
Login failed for user 'netstats'.

I tried connecting from SQL Server Management Studio and I was able to connect using the netstats user id and execute queries against the database.

But if I execute the same query from using the linked server, I get the mentioned error.

Any help is much appreciated.

Cheers


I also received such message previoiusly, ther ei s some firewall installed at the host side


kshitij kumar
kshitij@krayknot.com
www.krayknot.com
Post #611974
Posted Thursday, December 4, 2008 10:00 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Sunday, November 16, 2014 8:25 PM
Points: 72, Visits: 252
Thank you for the reply Kshitij.

You are right. There are firewalls installed between both hosts and both were in different domains. The appropriate network configurations were taken care of and network connectivity is fine when I got this error message.

I was able to fix the issue by changing the Remote connections to use both tcp/ip and named pipes under SQL Server 2005 Surface area configuration > Surface area configuration for services and connections > Remote connections. [By default remote connections are disabled in SQL Server 2005]

After making this change, created a linked server [Choose SQL Server instead of other data sources]. Under security, choose the option "Be made using this security context" for Local server login to remote server login mappings.

The query works a charm :)
Post #613881
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse