Link Different Sever problem

  • Thread starter Thread starter Agnes
  • Start date Start date
A

Agnes

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.myTable
I got an error said 'SQL Server does not exist or access denied'

Does any one can help , Thanks
 
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.myTable
I got an error said 'SQL Server does not exist or access denied'

Does any one can help , Thanks

sp_addlinkedserver doesn't try to connect to the server, neither does
sp_linkedservers. 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).
 
Have you used the sp_addlinkedsrvlogin 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
http://LemingtonConsulting.com

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


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.myTable
I got an error said 'SQL Server does not exist or access denied'

Does any one can help , Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top