Search code examples
sql-servert-sqlsql-server-2008-r2sql-server-2000linked-server

TSQL Having trouble adding a linked SQL Server 2008 R2 to SQL Server 2000


I'm having trouble trying to create a Linked Server to connect from a SQL Server 2008 R2 instance to a SQL Server 2000 instance using Windows Auth.

I can connect to SQL Server 2000 with SSMS with Windows Auth so network and user permissions should be OK.

Here's what I'm using so far

EXEC master.dbo.sp_addlinkedserver 
         @server = N'SalesLogix_db'
        ,@srvproduct=N'SalesLogix_db'
        ,@provider=N'SQLNCLI'
        ,@datasrc=N'xxx.xxx.xxx.xxx'
    GO

--Windows Authentication
EXEC master.dbo.sp_addlinkedsrvlogin 
         @rmtsrvname=N'SalesLogix_db'
        ,@useself=N'True'
        ,@locallogin=NULL
        ,@rmtuser=NULL
        ,@rmtpassword=NULL
    GO

EXEC master.dbo.sp_testlinkedserver SalesLogix_db;

And this is the error.

OLE DB provider "SQLNCLI10" for linked server "SalesLogix_db" returned message "Login timeout expired".
OLE DB provider "SQLNCLI10" for linked server "SalesLogix_db" returned message "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.".

Msg 53, Level 16, State 1, Line 24
Named Pipes Provider: Could not open a connection to SQL Server [53].

Where am I going wrong?

Thanks in advance


Solution

  • After much toing and froing I finally found the answer.

    I was failing with double-hop authentication failure.

    When I created the Linked Server using SSMS on the db server itself it worked.