Answered by:
Index Rebuild

Question
-
While rebuilding indexes log file is growing vary rapidly and we can't put DB in simple recovery mode because we have configured DB mirroring. Is there any way to minimize log file growth while index rebuild?
We have created index rebuild job with the help of SSIS package and we are executing index job once in a month during off business hours. The DB size is around 240 GB.
Monday, June 20, 2016 2:28 PM
Answers
-
No optimizations if you have to be in full recovery (which you have to because of mirroring). The best you can do is to not rebuild indexes when they don't have to be rebuilt. I suggest using Ola Hallengren's maintenance solution or only the indexoptimize proc for this (ola.hallengren.com).
- Proposed as answer by Lin LengMicrosoft contingent staff Tuesday, June 21, 2016 2:28 AM
- Marked as answer by Lydia ZhangMicrosoft contingent staff Wednesday, June 29, 2016 2:20 AM
Monday, June 20, 2016 2:54 PM -
While rebuilding indexes log file is growing vary rapidly and we can't put DB in simple recovery mode because we have configured DB mirroring. Is there any way to minimize log file growth while index rebuild?
We have created index rebuild job with the help of SSIS package and we are executing index job once in a month during off business hours. The DB size is around 240 GB.
Cheers,
Shashank
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
My TechNet Wiki Articles
MVP- Proposed as answer by Muhammad Awais Akram Tuesday, June 21, 2016 11:54 AM
- Marked as answer by Lydia ZhangMicrosoft contingent staff Wednesday, June 29, 2016 2:20 AM
Tuesday, June 21, 2016 7:29 AM
All replies
-
No optimizations if you have to be in full recovery (which you have to because of mirroring). The best you can do is to not rebuild indexes when they don't have to be rebuilt. I suggest using Ola Hallengren's maintenance solution or only the indexoptimize proc for this (ola.hallengren.com).
- Proposed as answer by Lin LengMicrosoft contingent staff Tuesday, June 21, 2016 2:28 AM
- Marked as answer by Lydia ZhangMicrosoft contingent staff Wednesday, June 29, 2016 2:20 AM
Monday, June 20, 2016 2:54 PM -
Hi Praveen,
I'm not sure how many transactionlog back ups you taking.. every day.
Please let us know your backup& transactionlog backup times in 24hrs?
If you run DBCC Loginfo, --Status should show 2 in your case,, if you take TL backup and then it will become 0..then size will decrease automatically decrease.
Thanks
Monday, June 20, 2016 2:59 PM -
you can build index one by one and after each index can take log backup to truncate log.Monday, June 20, 2016 3:02 PM
-
While rebuilding indexes log file is growing vary rapidly and we can't put DB in simple recovery mode because we have configured DB mirroring. Is there any way to minimize log file growth while index rebuild?
We have created index rebuild job with the help of SSIS package and we are executing index job once in a month during off business hours. The DB size is around 240 GB.
Cheers,
Shashank
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
My TechNet Wiki Articles
MVP- Proposed as answer by Muhammad Awais Akram Tuesday, June 21, 2016 11:54 AM
- Marked as answer by Lydia ZhangMicrosoft contingent staff Wednesday, June 29, 2016 2:20 AM
Tuesday, June 21, 2016 7:29 AM