How to Enable or Disable SQL Server Agent Job and How to Start Job at Later days - SQL Server DBA Tutorial

In this video you will learn multiple ways of how to enable and disable SQL Server Agent Job, how to schedule jobs that would run in later hours using SQL Server Management Studio as well as T-SQL script. It also explains how to enable or disable Job Schedule as well as how to update SQL Server Agent Job Schedule.

Scripts to Enable or Disable SQL Server Agent Jobs or Schedule to Start Later on Schedule

--disable Job
USE msdb ;
GO

EXEC dbo.sp_update_job
    @job_name = N'BackupAlldb',
   @enabled = 0 ;
GO

--enable job
EXEC dbo.sp_update_job
    @job_name = N'BackupAlldb',
   @enabled = 1 ;

   --Enable Job Schedule
   EXEC dbo.sp_update_schedule
    @name = 'WeeklyRun',
    @enabled = 0

    -- Disable Job Schedule
      EXEC dbo.sp_update_schedule
    @name = 'WeeklyRun',
    @enabled = 1

    --Start Schedule at Later date (04/04/2015)
    USE [msdb]
GO
EXEC msdb.dbo.sp_update_schedule @name=WeeklyRun, 
        @active_start_date=20150404
GO


How to Enable or Disable SQL Server Agent Job in SQL Server

14 comments:

  1. Thanks for a very interesting blog. What else may I get that kind of info written in such a perfect approach? I’ve a undertaking that I am simply now operating on, and I have been at the look out for such info. 여성유흥알바

    ReplyDelete
  2. NAturally like your website but you need to test the spelling on quite d few of your psots.
    Several of them are rife with spelling issue ans isn;t finding it very bothersome to tell the truth however i will surely come back again.

    여성알바

    고수익알바

    ReplyDelete
    Replies
    1. Please correct the comment in the T-Sql script for disable and enable job schedule.

      Delete
  3. Thanks for a very interesting blog. What else may I get that kind of info written in such a perfect approach? I’ve a undertaking that I am simply now operating on, and I have been at the look out for such info. Disability niche

    ReplyDelete
  4. We are tied directly into the sate’s renewal database which allows us to process your request almost instantly. polyurethane resin release agent

    ReplyDelete
  5. This is also a very good post which I really enjoyed reading. It is not every day that I have the possibility to see something like this.. http://www.cuckolddatingsites.org

    ReplyDelete
  6. I honestly appreciate the blog you have posted. Really looking forward to this kind of words.
    whirlpool top load washing machine

    ReplyDelete
  7. That method, for example, if a medical professional develops debilitating arthritis in her palms and might not carry out surgery, however can nonetheless paintings at any other occupation, say teaching, then the institution coverage will now no longer pay a gain to her. Further, if the business enterprise is paying the top rate for the coverage with pre-tax dollars, any blessings paid end up taxable earnings. Disability Insurance

    ReplyDelete
  8. Good artcile, but it would be better if in future you can share more about this subject. Keep posting. website

    ReplyDelete
  9. This is actually the kind of information I have been trying to find. Thank you for writing this information. 안전놀이터

    ReplyDelete
  10. I can’t believe focusing long enough to research; much less write this kind of article. You’ve outdone yourself with this material without a doubt. It is one of the greatest contents. 무료릴게임

    ReplyDelete
  11. The article looks magnificent, but it would be beneficial if you can share more about the suchlike subjects in the future. Keep posting. 팔팔카

    ReplyDelete
  12. This is the gain quantity this is payable every month an insured qualifies for advantages, following the removal period. disability article

    ReplyDelete
  13. I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. textbook answers

    ReplyDelete