DBCC Reindex job - Monitor the progress/completed tables

  • 1. We have an reindex job (for a number of tables). If say, we stop the job after some time, can we know till which table it got completed?

    2. Do DBCC checkdb, reindex etc have any way of logging(like SQL error logs), which we can use to analyse?

    3. Also, if say the DBCC checkdb fails, would the job fail?

    Because, as long as DBCC jobs run fine, its ok. But when there is an integrity issue (when DBCC checkdb runs), how do we get to know about it?

  • 1. What ever process you're using would need to keep track of which index has been done. There's nothing automatic around that.

    2. CHECKDB outputs it's results, and yes, you can look at them, and should. Also, if it finds an error, that gets written to the error log, and it raises an error. It depends on how you called it whether or not that error shuts down the process, error trapping, etc. REINDEX will raise an error too and again, it depends on how you're calling it what happens then.

    3. Usually yes, but again, it depends on how you've configured it. It's entirely possible to create a job that goes to the next step when it gets an error. So you need to look at what you have set to know for sure.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • You can easily create a maintenance plan it will create a text file so that you know what Indexes have been rebuilt and which one was being reindexed when you kill the job.

    I check the Input Buffer as well to identify the Index before I kill the job.

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

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

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