Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

Linked servers cannot be used under impersonation without a mapping for the impersonated login

$
0
0

So I have seen other forum posts, but they haven't exactly matched the issue I am having (though I am getting this same error!)

I am trying to run a sql server agent job that runs a stored procedure that queries a linked server (another MSSQL instance) and writes to a table in a database.  I am trying to run the account job as a domain account ie..  DOMAIN\SVC_REPORT.  This account has rights on the local database for writing, has the permission on msdb to run agent jobs, and has rights to query the data on the destination server.   I can log onto this database server as this user, run the stored procedure and it works with passthrough authentication.  However when I schedule it through an agent job I get the above error.  Security it set to be made using the login's current security context.  If I set up mappings, using either the SQL Service account for the instance OR DOMAIN\SVC_REPORT and map it to a local sql account on the destination server with rights to the data it also works.  So I have the work around, I just don't know why I can't run the agent job and have it pass authentication credentials through to the target without the mapping? 

Thank you for any replies!!

Jay


Viewing all articles
Browse latest Browse all 12963


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>