How to reduce the size of SQL Transaction Log (.ldf) file?

Is there a way to reduce the size of the .ldf file that contains the SQL transaction logs ?
Can it be setup to do only incremental logging ?
Does Origam depend on this file for any information ?

Transaction log (LDF) is an internal tool of the SQL Server database and is not accessed directly by ORIGAM.

It is used mainly when

  • rolling back transactions
  • recovery after unexpected server restart (e.g. rolling back all unfinished transactions)

There is no easy answer on what you should do. Maintaining a SQL database is not a simple task and you should know well about what and why you are doing. For an exhaustive description of transaction logs please follow this Stack Overflow article.

1 Like

I have had the same problem. Log file increase over 200GB. Shrink log file was end with error everytime. My solution: Full backup database. Switch database recovery model from full to simple mode. Shrink log file. (now without problem) Switch database recovery model from simple to full mode. Log file size now 10MB.

1 Like