I am trying to query across servers.
The error message I got was:
Access to the remote server is denied because no login-mapping exists.
I found this SO post:
I am having trouble setting this up though:
Let's say I have the following parameters:
user login = 'john.doe'
server = 'abc'
instance = '123'
schema: 'dbo'
database: 'restaurant_menu'
sql server version = '2016'
I am not sure how to set this up. This is what I came up with so far. Also, this is just a one-time query that may get ran up to a couple more times, but that is it.
EXEC master.dbo.sp_addlinkedserver
@server = N'abc',
@provider = N'SQLNCLI',
@srvproduct =
@datasrc =
@location = -- I don't think I need to fill this part out
@provstr =
@catalog =