Tuesday 1 October 2013

Shrink Database Logs

Shrinking the transaction log file is a process of reducing the size of the transaction log. This process is important because if the transaction log file is left unchecked it can grow until it consumes the hard disk space of your server.

Listed below are the steps on how to truncate or shrink database log files (LDF) in your Development or Local Servers. In these steps we will set the database into a Simple Recovery Model which automatically reclaims log space. 
  1. Right click database >> Options >> Set Recovery Model to Simple >> OK
  2. Right click database >> Tasks >> Shrink >> Files
  3. Select File type = Log >> OK
  4. Set back the Recovery Model to Full

For more information about recovery model refer to http://msdn.microsoft.com/en-us/library/ms189275.aspx




No comments:

Post a Comment