---
 
 
---
 
 
Smilepk Home | Tips Home | Contact | Games | Themes | Wallpapers | Videos
GOOGLE
Free SEO, Web Related Tips
    Web Hosting Guide
    SEO Articles, Tips
    Earn With Google
    Hot n Top Tips
    Mix Web Special
    Miscellaneous Tips
---
Free Windows xp Tips
    User Interface
    Usability Tweaks
    Security Tricks
    Hardware Tweaks
    Internet & Network
    System Performance
    Miscellaneous Tips
    Software Tips
---
Today World Tips
    Travelling Tips
    Cooking Tips
    Credit Card Tips
    Photography Tips
    Handwriting Tips
    Student Visa Tips
    Resume Tips
    Aloe Vera Tips
    Weightloss Tips
    Beauty Tips
    Mobile Codes Tips
---
Free Other Categories Tips
    PC Buying Tips
    System Tune-Up
    MS Office Tips
    Security Alerts
    Database Tips
    Registry Tricks
    Pc Troubleshooting
    Backup Tricks
    Printing Tips
    Cisco Router Tips
    Glossaries...
    Laptop Tricks
    PC Cleaning Tips
    System FAQs
    Internet Tips
    Windows Vista Tips
---
Free Broadband Tips
    ISP Tricks
    Wireless Tips
    VPN Tricks
    Mobile Tips
    ATM Tips Tricks
    Optic Fiber Tips
    Cable Net Tweaks
    DSL Tips Tricks
    Projector Tips
   Log File Growth and DBCC DBREINDEX
     Home   Database Tips  Administration Tips
----

Q
I have a 30 gigabyte (GB) database, and I use the Full recovery model. Whenever I use the database consistency checker (DBCC) statement DBCC DBREINDEX to reindex certain large tables periodically, I change the recovery model to Bulk_Logged, then return it to Full after the reindexing is complete. I expected that this change would help me avoid huge transaction log file growth, but the subsequent log file backup is always enormous—around 15 GB. Logically, the data in the database is the same as before the reindexing, except that the indexes are reorganized, so why is the log file so large? And how can I avoid such significant growth?


A
Yes, the data is the same, but the indexes are on completely new pages. When you perform a DBCC DBREINDEX, SQL Server logs only extent allocation (eight-page units) instead of each row or page that has been changed. This type of logging avoids physical file corruption in the event of system failure and it minimizes the impact that more detailed logging would have on throughput.

When you back up the log, SQL Server has to back up the pages allocated in those extents so that they can retain database backup and log backup consistency. If SQL Server didn't back up those pages, you wouldn't be able to switch back to the Full recovery model until you did a complete database backup. You have to be able to restore the database from the last full backup and any differential backups, as well as any later transaction log backups.