DBCC CHECKDB JOB STOPPED EXECUTION

  • Good morning Experts,

    We have set up a DBCC CHECK JOB yesterday. We also have transaction log backup jobs scheduled on the instance.DBCC CHECK job did CHECKDB on 2 databases and after that few log backup jobs started at same time. The Log backup jobs completed successfully, however, DBCC CHECK job did not do CHECKDB on remaining databases and stopped execution. Could you please let me whats the reason for it and how to fix it.

  • Any error messages in the SQL Logs? Just from your description, not much we can do to help.

  • It just says "Maintenance completed with errors". Thats it, there is no other information or error message posted in the SQL Logs or Job output files etc.

  • Interesting thing is that, after 1 hour, the DBCC CHECK job was restarted. During its run, it did not encounter any log backup jobs and fascinatingly it did CHECKDB on all the databases and completed successfully.

  • coolchaitu (6/1/2016)


    It just says "Maintenance completed with errors". Thats it, there is no other information or error message posted in the SQL Logs or Job output files etc.

    I haven't used maintenance plans in forever, but they may have their own error log files. See if you can find them (if they exist) and see what is in those files.

  • The job actualy runs a Powershell script that does DBCC CHECK on all databases. The output log just says "Maintenance completed with errors".Thats it, there is no other information or error message posted in the SQL Logs or Job output files etc. Also, it did not restart on its own. We manually restarted the job after 1 hour and it did consistency checks on all databases,it did not encounter any log backup jobs.

  • coolchaitu (6/1/2016)


    The job actualy runs a Powershell script that does DBCC CHECK on all databases. The output log just says "Maintenance completed with errors".Thats it, there is no other information or error message posted in the SQL Logs or Job output files etc. Also, it did not restart on its own. We manually restarted the job after 1 hour and it did consistency checks on all databases,it did not encounter any log backup jobs.

    Not sure why you elected to complicate matters by using PowerShell. Simple loop driven by a query on sys.databases would do just fine.

    To coin the phrase, "Just because you can do something outside of SQL Server, doesn't mean you should". 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Hi Jeff,

    It was management's decision. So, can we conclude that it stopped when it ran for the first time due to log backup job running at same time?

  • coolchaitu (6/1/2016)


    Hi Jeff,

    It was management's decision. So, can we conclude that it stopped when it ran for the first time due to log backup job running at same time?

    You may make that conclusion, but you have nothing to substantiate the conclusion.

  • coolchaitu (6/1/2016)


    So, can we conclude that it stopped when it ran for the first time due to log backup job running at same time?

    What evidence are you using to jump to that conclusion?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Hi Gail Shaw,

    When we manually restarted the job after 1 hour,it did not encounter any log backup jobs. and it did consistency checks on all databases.

  • coolchaitu (6/2/2016)


    Hi Gail Shaw,

    When we manually restarted the job after 1 hour,it did not encounter any log backup jobs. and it did consistency checks on all databases.

    Then you are basing it on coincidence. No hard facts to substantiate the conclusion.

  • Hi Lynn Pettis,

    Not really understanding why it it did consistency checks on all databases, after we manually restarted the job after 1 hour. Could you please let me know what could be the reasons? Could you please help on how to find the cause?

  • Look through your logs and history, if the job failed there should be a reason somewhere in some log.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Good Morning Experts,

    This re-occurred again today. When it ran the first time, it performed CHECKDB only on 2 databases and failed. After we re-ran the job it performed CHECKDB on all databases and succeeded.

    I have attached the log of the job when it ran first time and second time.

Viewing 15 posts - 1 through 15 (of 18 total)

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