Posts

Showing posts with the label sql-job

SQL Job, Linked Server, Domain Account

Image
Clash 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 withou...