Managed Instance Error Creating Recurring Schedule - BUG???

  • DBADave

    SSChampion

    Points: 10962

    When we try to create a SQL Server Agent job schedule that has a recurring frequency type we get the following error:

    SQL Server Agent feature Schedule job ONIDLE is not supported in SQL Database Managed Instance. Review the documentation for supported options.

    If we click ok to the message and then edit the unsaved schedule, the unaltered scheduled successfully saves.  A Profiler trace reveals @freq_type of 128, which is incorrect.  That type indicates "Run when the computer is idle.".  But when we edit the schedule, make no changes, and it saves successfully, the Profiler trace shows @freq_type=4, which is correct.  Has anyone experienced this behavior?

    EXEC msdb.dbo.sp_add_jobschedule @job_id=N'18bbf0bd-00ce-4734-b28c-8374a71e3708', @name=N'Test Schedule - Daily',

    @enabled=1,

    @freq_type=128,

    @freq_interval=1,

    @freq_subday_type=0,

    @freq_subday_interval=0,

    @freq_relative_interval=0,

    @freq_recurrence_factor=1,

    @active_start_date=20190717,

    @active_end_date=99991231,

    @active_start_time=0,

    @active_end_time=235959, @schedule_id = @schedule_id OUTPUT

     

  • DBADave

    SSChampion

    Points: 10962

    This was a bug in Management Studio 17.9.1.  sp_add_jobschedule was providing an incorrect value for @freq_type, which was 128 "Run when the computer is idle".  I found that if I clicked OK to the error, then EDIT, then immediately SAVE the schedule without changing anything, sp_add_jobschedule would execute a second time, but this time providing @freq_type = 4, which is for a Daily frequency.  All this was witnessed within a Profiler trace.  The error only occurred when the frequency type in the GUI was "recurring".  Installing Management Studio 18.1 resolved the problem.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply