locked
SQL Server Agent job running with no schedule RRS feed

  • Question

  • Hi all,

    I realised a little while ago that I had a SQL Server Agent job running even though the associated schedule was disabled.  In the history for the job it listed the message as:

    The job succeeded.  The Job was invoked by Schedule 231 (30 min schedule).  

    I didn't want to remove the job, so I deleted the schedule, and checked sysschedules and sysjobschedules and Schedule_ID 231 was then no longer there (it had been before removing the schedule).  No other schedules existed in the sysjobschedules table for that job.

    Mysteriously, the job continues to run, and each time the history lists Schedule 231.  I've tried a profiler trace and can't work out how SQL Server Agent knows which job to run and where it gets the information for that message.  It feels like it has cached the schedules. Out of curiosity does anyone have any idea why this might be happening or seen this before?  I haven't yet restarted the SQL Server Agent, but that is likely to be my next step.  

    It is SQL Server 2005 SP1, so it's very possible it's just a quirk that existed in an old version.

    It's not an urgent problem, but I've been working with SQL Server for a long time and never seen this before so would be interested if there's anything I can learn from it.  (Obviously I could delete the job, so I'm sure I can fix the issue.)

    Many thanks to anyone who offers help or ideas!

    Wednesday, August 29, 2012 8:23 AM

Answers

  • Hi,

    if you dont want that Scheduled job to be executed again again so disable it from SQL agent jobs tab and then also it is still executing as you told in your post tht in history you can see that job is executed so check out any of the alerts might be executing that job in response to alert.

    Regards,

    ashish 

    • Proposed as answer by Ashish_DbaSQL Thursday, August 30, 2012 7:49 AM
    • Marked as answer by Maggie Luo Thursday, September 6, 2012 3:46 PM
    Thursday, August 30, 2012 7:49 AM

All replies

  • right click on the job,select disable

    instead of removing the shedule


    Ramesh Babu Vavilla MCTS,MSBI


    Wednesday, August 29, 2012 8:45 AM
  • Hi,

    if you dont want that Scheduled job to be executed again again so disable it from SQL agent jobs tab and then also it is still executing as you told in your post tht in history you can see that job is executed so check out any of the alerts might be executing that job in response to alert.

    Regards,

    ashish 

    • Proposed as answer by Ashish_DbaSQL Thursday, August 30, 2012 7:49 AM
    • Marked as answer by Maggie Luo Thursday, September 6, 2012 3:46 PM
    Thursday, August 30, 2012 7:49 AM