locked
How Can I add a linked server with IP address only(Not server name) RRS feed

  • Question

  • Hi, there,

    I am try to add a linked server to one of my server. the problem is, those two servers are not on the same network. I have to put in IP address as linked server name. I added the server OK, but when I do the query, I have to put the server name in the query, which caused error.

    say the IP address of the linked server is 64.253.133.100
    the query looks like,

    select * from 64.253.133.100.databasename.dbo.tablename

    Is there any way I can add the linked server with IP address at all?

    Thank you

    Jack


    Thursday, February 22, 2007 6:07 PM

Answers

  • You can keep the linked server name different from the actual server name (which you are refering to as IP). Use this
    EXEC master.dbo.sp_addlinkedserver @server = N'LINKEDSERVERNAME', @srvproduct=N'SQLNCLI', @provider=N'SQLNCLI', @datasrc=N
    '64.253.133.100'
    Use master.dbo.sp_addlinkedsrvlogin to set the appropriate login/password.

    Thanks,
    Kuntal

    Thursday, February 22, 2007 7:45 PM

All replies

  • You can keep the linked server name different from the actual server name (which you are refering to as IP). Use this
    EXEC master.dbo.sp_addlinkedserver @server = N'LINKEDSERVERNAME', @srvproduct=N'SQLNCLI', @provider=N'SQLNCLI', @datasrc=N
    '64.253.133.100'
    Use master.dbo.sp_addlinkedsrvlogin to set the appropriate login/password.

    Thanks,
    Kuntal

    Thursday, February 22, 2007 7:45 PM
  • Kuntal

    Thank you so much. It worked.

    Jack
    Thursday, February 22, 2007 8:56 PM