Wednesday, March 21, 2012

purge .ldf file

I'm assuming that the .ldf file houses all the transaction logs, well mine is getting quite large (like 6 times the size of my .mdf) and I'm wondering if there is a way to purge logs back to a specific date. Can anyone give me some direction? ThanksYou can't clear the log selectively... Its unfortunately an "all or nothing" proposition. Check out the How To (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/howtosql/ht_7_backpc_4915.asp) from BOL.

-PatP|||Your log files grows so large because there are action queries against your database that modify large volumes of data. Assuming your Recovery Mode is Simple, the smaller your transactions in terms of volume of data affected, the less chances are that your log would grow. If the recovery mode is Full or Bulk-Logged, the growth also depends on the frequency of transaction log or full database backups.

No comments:

Post a Comment