We are using the Index Maintenance of Ola Hallengren (https://ola.hallengren.com) solution for a couple of years now. While setting up some new SQL servers we are seeing some strange behaviour in the SQL Agent Job.
When an error is raised in the process of trying to ALTER and index or UPDATING a statistics object the job fails the job also fails. But i cannot see why the job failed in the log. I can see errors written in the CommandLog table which we log to with the @LogToTable = 'Y' set in the jobstep, but don't see why the job would fail.

Question: Does the job exit as failed when 1 or more errors have occured in the maintenance time? Or is something else wrong?

Thanks in advance

  • 1
    Set up the job output file and search for the error there. – Ramakant Dadhichi Oct 4 at 10:44
  • Is the job failing or is the script failing? The commandlog will show if the script is failing, the error log on SQL Server / history of the job will show why the job is failing. – Shaulinator Oct 4 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.