February 27, 2012 at 3:22 am
Thanks everyone for your response.
I know shrink is bad idea but as Paul said we do it with calculation. We try to shrink the log file to 1/4 of the mdf file and in my current scenario, shrink never happens as most of my log files are around 15-20% of the data file.
We are using shrink option in order to control the log file growth.......
Once again thanks everyone for your reponse......
February 27, 2012 at 3:46 am
Shrink is not how you control the growth of the log. The log should be big enough for the largest single transaction, the largest number of transactions between log backups and left alone. If the log reaches half the size of the MDF during regular activity that's because it needs to be that size.
Once-off shrinks after unusual activity is fine, regular shrinks are just going to hinder the performance of your system
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
February 28, 2012 at 10:15 am
1) don't shrink the tlogs - they are VERY likely to grow back up again, leading to OS disk file fragmentation
2) logs won't necessarily shrink when you force it due to internal structures known as Virtual Log Files (VLFs). If the active portion of the log is in a VLF near the end of the physical file you won't get much size decrease. You can add "dummy" transactional data to the log to get the VLF to "wrap" back to the beginning of the physical file.
3) don't shrink the tlogs! :w00t:
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
Viewing 3 posts - 16 through 17 (of 17 total)
You must be logged in to reply to this topic. Login to reply