Link Different Sever problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Agnes

    #1

    Link Different Sever problem

    I had connect another SQL server VIA VPN , the server name is IP e,g
    123.123.123.123
    I can read the data sucessfully,
    However, I want to insert some data from my local server.
    sp_addlinked server '123.123.123.13 '
    sp_linkedserver (I can see it)

    then select * from [123.123.123.123].database.dbo.m yTable
    I got an error said 'SQL Server does not exist or access denied'

    Does any one can help , Thanks


  • David Lloyd

    #2
    Re: Link Different Sever problem

    Have you used the sp_addlinkedsrv login to map logins between your local db
    and the remote db? Please see BOL for info on how to use this stored
    procedure.

    --
    David Lloyd
    MCSD .NET
    Award-winning Managed I.T. Services, I.T. Consulting, cloud solutions, database hosting, and A.I. software development for organizations nationwide.


    This response is supplied "as is" without any representations or warranties.


    "Agnes" <agnes@dynamict ech.com.hk> wrote in message
    news:eQrto$rVFH A.2572@TK2MSFTN GP14.phx.gbl...
    I had connect another SQL server VIA VPN , the server name is IP e,g
    123.123.123.123
    I can read the data sucessfully,
    However, I want to insert some data from my local server.
    sp_addlinked server '123.123.123.13 '
    sp_linkedserver (I can see it)

    then select * from [123.123.123.123].database.dbo.m yTable
    I got an error said 'SQL Server does not exist or access denied'

    Does any one can help , Thanks



    Comment

    • Lucvdv

      #3
      Re: Link Different Sever problem

      On Thu, 12 May 2005 14:57:46 +0800, "Agnes" <agnes@dynamict ech.com.hk>
      wrote:
      [color=blue]
      > I had connect another SQL server VIA VPN , the server name is IP e,g
      > 123.123.123.123
      > I can read the data sucessfully,
      > However, I want to insert some data from my local server.
      > sp_addlinked server '123.123.123.13 '
      > sp_linkedserver (I can see it)
      >
      > then select * from [123.123.123.123].database.dbo.m yTable
      > I got an error said 'SQL Server does not exist or access denied'
      >
      > Does any one can help , Thanks[/color]

      sp_addlinkedser ver doesn't try to connect to the server, neither does
      sp_linkedserver s. You can even specify a non-existing computername or one
      that's off-line, it will still succeed.

      A connection is made only when you execute a query against one of its
      databases.

      My best guess is that you really don't have access from where your code is
      running.


      I thought it could be caused by the SQL Server service running under the
      local system account, but that's only for replication: I just tried, and
      got access to another server perfectly while both were running under the
      local system account (of their respective machines).

      Comment

      Working...