Skip to content
Advertisement

SQL agent job creation error: Job ‘XXX’ is already targeted at server ‘YYY’

I am trying to create and SQL agent job on SQL Server 2016. Here is the use of sp_add_job.

The error message appears:

Msg 14269, Level 16, State 1, Procedure sp_add_jobserver, Line 101 [Batch Start Line 2]
Job ‘TEST_RUN_A_JOB_STEP’ is already targeted at server ‘EDW222’.

I have done significant searching with no results. There is no job with such a name. SELECT COUNT(*) FROM sysjobs WHERE name LIKE 'TEST_RUN%'; returns zero (0).

The job that does not exist cannot be deleted with sp_delete_job.

Why can this job not be created?

Revision 1

Here is the entire script if that will help.

Advertisement

Answer

Alternatively, you can use the SSMS interface to setup the jobs details and then click to generate SQL Script option.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement