What are MS Exchange Transaction log files
Microsoft Exchange Server transaction logging is a robust disaster recovery mechanism that is designed to reliably restore an Exchange database to a consistent state after any sudden stop of the database.
Before changes are actually made to an Exchange database file, Exchange writes the changes to a transaction log file. After a change has been safely logged, it can then be written to the database file.
If after a start the database is found in an inconsistent state or has not been shut down properly, Exchange scans the log files, and reconstructs and applies any changes not yet written to the database file. This process is called replaying log files. The database is structured so that Exchange can determine whether any operation in any log file has already been applied to the database, needs to be applied to the database, or does not belong to the database.
How Exchange Server Maintains Transaction log files
Before committing a transaction to a database file, Exchange logs it to a transaction log file. To track which of the logged transactions have been committed to the database, Exchange uses checkpoint files. Once the transactions are committed to the database and tracked by the checkpoint files, the log files are no longer needed by the database.
If the log files are not deleted, they will eventually consume all the available disk space and the Exchange databases will be taken offline until the log files are purged from the disk.
Exchange automatically removes unnecessary log files by using one of the following methods:
- If circular logging is enabled, Exchange Server removes transaction logs soon after they have been written to the database file.
- If circular logging is disabled, Exchange Server removes excess logs after a full or incremental online backup of all the databases in a storage group is performed.
Using circular logging is not the best practice for a production environment. When circular logging is enabled, Exchange overwrites the first log file after its data has been committed to the database, and you can recover the data only up until the last backup.