Unable to join 2 tables which are in 2 differenet servers

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vanitha05
    New Member
    • May 2007
    • 5

    #1

    Unable to join 2 tables which are in 2 differenet servers

    Hi all,

    I am trying to get the data from 2 tables which are in 2 different servers , to get that i have used
    "sp_addlinkedse rver" .Using this I am able to connect to the server also .I have used the following commands

    for example my server ip is 11.12.23.121

    EXEC sp_addlinkedser ver '11.12.23.121'
    EXEC sp_addlinkedsrv login @rmtsrvname = '11.12.23.121'

    after this I am not bale to get the results of the linked server using following query

    select * from '11.12.23.121'. testdb.dbo.user reg

    Please tell me how to get the data from the linked server.

    Thanks in advance
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Try:
    Code:
    select * from [11.12.23.121].testdb.dbo.userreg
    What error did you get?

    Good luck!!!

    --- CK

    Comment

    • vanitha05
      New Member
      • May 2007
      • 5

      #3
      Hi ,

      Thank you for your reply ,

      I have tried to get the data as said by you but I ma getting the following error

      "OLE DB provider "SQLNCLI" for linked server "[server]" returned message "Login timeout expired".
      OLE DB provider "SQLNCLI" for linked server "[server]" returned message "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.".
      Msg 53, Level 16, State 1, Line 0
      Named Pipes Provider: Could not open a connection to SQL Server [53]. "


      can you please tell me how to get rid of this.

      Thank you

      Comment

      Working...