dbcc job & transaction log backup

  • Hi ,

    I have a question :

    1. Can DBCC DBREINDEX or DBCC CHECKDB or DBCC INDEXDEFRAG run concurrently with transaction log backup ?

     

    Appreciate your help. Thank you

     

  • I can't get u?. Do u asking the order of executing this commands before back up?????????

    Rafi-

  • You can definately take log backups whilst running dbcc indexdefrag.

    However, dbreindex and checkdb both place schema locks on tables so you won't be able to run a log backup.  Well, you can probably run a backup concurrently but I suspect that the log backup will just sit there waiting for the dbcc command to complete.  Haven't tried this myself but you can always try it and see what happens.

    Any specific reason you're asking?

     

  • Hi there..

    Thank you for your reply.

    I plan to schedule dbreindex & checkdb using the maintenance plan . My problem is I have transaction log backup scheduled to be run every hour . So I just wanna check if these jobs running together.

    Thank you.

     

  • I do not know what is your database size and disk space but make sure you have enough disk space for transaction log if the recovery model is set to be full. DBCC reindex will grow your transaction log heavly

     


    Kindest Regards,

    Amit Lohia

  • It is always better to run dbcc dbreindex while there are no transactions on the corresponding tables as it locks the entire schema. Do not schedule it in maintenance plan but run it manually while making sure nobody is accessing if you see some transactions are blocked by your dbcc then you can stop at any time and your dbcc will get rolled back to the original state. but the the rollback time also depends on the size of the table. or

    you can use dbcc indexdefrag which is online transactions(it also puts some locks but that will be there for some milliseconds or upto 2 secs) you can schedule indexdefrag as part of your maintenance task. Your log shipping will not get affected.

Viewing 6 posts - 1 through 5 (of 5 total)

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