Lesson Learned #314: Cannot start the job ‘XXX’ because it does not have any job server

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Community Hub.

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>', _name = N'<your_mi_server>.database.windows.net' ; GO

 

Enjoy!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.