Lesson Learned #314: Cannot start the job 'XXX' because it does not have any job server
Published Feb 01 2023 12:09 AM 2,843 Views

Today, we had a new service request where our customer receives the following error when they try to run a created job in SQL Managed Instance: Cannot start the job 'XXX' (ID XXXXX-XXXX-XXX-XXXX-XXX) because it does not have any job server or servers defined. Associate the job with a job server by calling sp_add_jobserver. (Microsoft SQL Server, Error: 14256)

 

After checking the error ( 14256 ) it is verified that the job has not been mapped in the managed instance server when it was created, so following the guidelines to do it manually using 'sp_add_jobserver' stored procedure and after executing the code below, job worked  correctly. 

USE msdb ;  
GO  
  
EXEC dbo.sp_add_jobserver  
    @job_name = N'<your_job_name_here>',   
    @server_name = N'<your_mi_server>.database.windows.net' ;   
GO

 

Enjoy!

Version history
Last update:
‎Feb 01 2023 12:09 AM
Updated by: