Don't panic

 

Cry about...
SQL Server Troubleshooting


Error 14256: Cannot start job 'XXXX' (ID NNNN) because it does not have any job server(s) defined


Symptom:

When trying to start a job using SQL Server Enterprise Manager the following error is generated:

Error 14256: Cannot start job 'XXXX' (ID NNNN) because it does not have any job server(s) defined

or when using 'exec sp_start_job ...') the following error is generated:

Server: Msg 14256, Level 16, State 1, Procedure sp_start_job, Line NN
Cannot start job 'XXXX' (ID NNNN) because it does not have any job server(s) defined.

Where 'XXXX' is the name of the job and 'NNNN' is the job's unique ID.

Cause:

Each job must have a server associated with it on which the job will be run.

Possible Remedies:

If using SQL Server Enterprise Manager:

  1. Open the properties of the job (expand the server within SQL Server Enterprise Manager, open Management, open SQL Server Agent, select jobs and right click the job that failed to start and select 'properties').
  2. Click either 'Target local server' or 'Target multiple servers'. Typically the 'Target multiple servers' option will be greyed out. Be sure to click the 'Target local servers' even if it is the only option available, the 'Apply' button will then become enabled.
  3. Click 'Apply'.

If using T-SQL, specify the server using sp_add_jobserver, e.g:

exec sp_add_jobserver
  @job_name="NNNN",
  @server_name="(local)"

substitute the name of the server in the above if it is not the local server that is to be used.


These notes are believed to be correct for SQL Server 7 and may apply to other versions as well.



About the author: is a dedicated software developer and webmaster. For his day job he develops websites and desktop applications as well as providing IT services. He moonlights as a technical author and consultant.