I have a job configured on one server, named Server A, to insert a row into a table in the master database on another server, named Server B. A trigger exists on the table that will execute the two sp_start_job commands below by passing the job name.
EXEC ServerB.msdb.dbo.sp_start_job @job_name = 'First Job'
EXEC ServerB.msdb.dbo.sp_start_job @job_name = 'Second Job'
The job on Server A is returning the below error:
The specified @job_name ('First Job') does not exist. [SQLSTATE 42000] (Error 14262) The specified @job_name ('Second Job') does not exist. [SQLSTATE 42000] (Error 14262)
These jobs do not exist on Server A, but do exist on Server B. Does anyone know how to resolve this? The servers are linked and the login used for the linked server has INSERT permission on the table with the trigger and SELECT permission to the msdb.dbo.sysjobs table. The login also has permission to run sp_start_job.
Thanks so much!