Read time 4 minutes

Summary: Circular logging helps in saving disk space by cleaning the old transaction logs. When you enable it, the size of log files is restricted beyond 1MB, and it gets overwritten once full. Exchange Server admin can enable it with Exchange Management Shell or Console. Here, we will understand how to enable circular logging in Exchange Server 2010 and the way Kernel for Exchange Server helps in data recovery.

What is Circular logging?

In Exchange Server, Circular logging is not enabled by default. Circular logging is a mechanism in which the Exchange Server automatically overwrites individual transaction log files once their data has been successfully committed to the database. This proactive approach prevents the transaction log files from continuously growing, effectively conserving valuable hard disk space.

The term “circular” refers to the practice of deleting log files on a rotating basis when the disk space limit is reached, following a Last-In, First-Out (LIFO) queue approach. Circular logging is a constituent of JET (Joint Engine Technology). All the versions of Exchange Server use it, and one can enable or disable this component through admin.

What Happens When

  • Circular logging is disabled: If circular logging is disabled, each log file goes into the transactional log database, so there is no limit on the maximum size of the database (no limit exists).
  • Circular logging is enabled: While circular logging is enabled, the maximum size of the transactional log files is limited to 1 megabyte (MB). It is implemented by overwriting the previous log files automatically once the maximum limit is reached. Thus, the transaction log database does not grow any further.
Important Points to Remember
  • Without a complete set of transactional log files, it is impossible to recover new data. So, circular logging is not recommended in production environments.
  • While doing backups (incremental as well), enabling circular logging on the Exchange database is not recommended.
Ways to enable Circular logging in Exchange 2010
  • Using Exchange Management Console
  • Using Exchange Management Shell
Using Exchange Management Console

Enable circular logging in Exchange 2010 using Exchange Management Console with the few steps below.

  • Start Exchange Management Console
  • Choose Organization Configuration, expand it and then click Mailbox
  • On the Database Management tab, select the database to configure
  • Under the database name, in the action pane, click Properties
  • Click Maintenance tab > select Enable circular logging check box > click OK
  • This will show a Warning prompting the need to dismount and mount the database to reflect the changes. Click OK and proceed.
With Exchange Management Shell

For Exchange 2010, you can enable Circular logging by executing the following command:

Set-MailboxDatabase -Identity “Database Name” -CircularLoggingEnabled $true

Note: To make the changes to circular logging settings effective, perform any of two – Restart the Microsoft Exchange Information Storage Service, or Dismount and mount the databases.

You can also use the alternate command mentioned below to perform the action for all databases.

Get-MailboxDatabase | Set-MailboxDatabase CircularLoggingEnabled:$true
Issues you may face with Circular logging

You may encounter a condition where database storage space is filling up continuously. Once you reach a certain threshold point of storage, there could be a failure in mounting the Exchange Database. Now, before you enable circular logging to free up space in your database, you must make a copy of the log and database. This must be done to have a backup of the database and to replay the logs again when required.

When you employ Exchange Server with VSS ( Windows Volume Shadow Copy Service) backup infrastructure having circular logging enabled, remember that you need to disable circular logging before the next backup. If you fail to do so, you won’t be able to take full or incremental backup.

If you have it enabled during the incremental backup, the log files that are needed are truncated as the previous backup is not available. So, the intended backup will fail. Therefore, when you want to perform VSS backups, turn circular logging off.

Cons of Circular logging in Exchange Server
  • It requires complete transaction log files. Thus, most production environments do not favor circular logging.
  • Also, there will be extra downtime that users have to face while dismounting and re-mounting the database once you enable circular logging.

Can third-party tools help after Exchange data loss?

In the event of data loss, there exist several viable solutions for recovering Exchange Server data. Among these, it stands out as a top-tier choice for repairing corrupt Exchange database files, with the added advantage of not needing log files for the recovery process. Additionally, an EDB to PST converter can efficiently extract data from Exchange backup files, offering another effective avenue for data retrieval.

Conclusion

When you enable circular logging in Exchange 2010, you free up disk space for users. This space provides more storage to keep your data on the Exchange Server. However, circular logging is a manual data management strategy.

Here, we provided you with the techniques to enable circular logging with the issues that you can face while enabling it. If for any reason, you can’t dismount or re-mount the database, use Kernel for Exchange Server. This tool allows you to recover, repair and restore your Exchange mailboxes and database.

Kernel for Exchange Server