SQL Job, Linked Server, Domain Account

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


SQL Job, Linked Server, Domain Account



I think I have tried everything but I can't figure out how to set up an SQL Job that have a T-SQL Step that performs a SELECT on a linked server.



1) I got a Domain user mydomainSQLJob



2) I got a SQL 2017 server 'JOBSERVER' with the SQL Agent running log on as a domain user mydomainsv_agent (this cannot be changed). No futher rights should be given to this user either.



3) On the JOBSERVER I created a linked server


EXEC sp_addlinkedserver 'LINKEDSERVER'



4) mydomainSQLJob is data reader on a database on LINKEDSERVER



5) I am able to do a SELECT * FROM LINKEDSERVER... from JOBSERVER in a regular Query Window.



On JOBSERVER I have tried


ALTER DATABASE MyDatabase SET TRUSTWORTHY ON



And then set the job to execute in MyDatabase



I have also tried


Job Step Properties > Advanced > Run as user > mydomainSQLJob



I have tried adding mydomainSQLJob to the linked server on JOBSERVER both with and without Impersonate



Could someone let me know what the correct steps are ?



Thanks









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Arduino Mega cannot recieve any sketches, stk500_recv() programmer is not responding

Visual Studio Code: How to configure includePath for better IntelliSense results

C++ virtual function: Base class function is called instead of derived