Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Error creating a Linked server


Error creating a Linked server

Author
Message
Mohammed Imran Ali
Mohammed Imran Ali
Valued Member
Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)

Group: General Forum Members
Points: 73 Visits: 258
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
krayknot
krayknot
Old Hand
Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)Old Hand (348 reputation)

Group: General Forum Members
Points: 348 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
Mohammed Imran Ali
Mohammed Imran Ali
Valued Member
Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)Valued Member (73 reputation)

Group: General Forum Members
Points: 73 Visits: 258
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 Smile Smooooth
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search