In the previous article, we did update MX records to Office 365. This time, we…
Enable circular logging in Exchange Server
We don’t recommend to enable circular logging in Exchange Server. That’s because an excellent backup system will truncate the database logs. What if the backup didn’t work, and you need a solution before the disk size is getting full? This article will learn how to enable circular logging with PowerShell and in Exchange Admin Center.
Table of contents
Should I enable circular logging in Exchange Server?
When to enable circular logging and clear the database logs? For example:
- The disk is getting full, and you are not able to expand the disk.
- There are problems with the backup software, and the logs are increasing.
- Migrating mailboxes to that particular database.
- The database is configured in a test environment.
Note: Don’t forget to disable circular logging after configuring the backup, placing the database in production, or finishing migration.
Before enabling circular logging
In our example, we are going to look at the default mailbox database. We recommend to rename and move the default database to another disk. Before doing that, configure ReFS volume on the disk.
We have 1.681 items in the folder. That’s around 1.68 GB in total size. How to clear the logs from a particular database?
In the next step, we are going to enable circular logging in Exchange mailbox database.
Enable circular logging Exchange in EAC
Sign in to Exchange Admin Center (EAC). Go to servers and follow with databases at the top. Click the mailbox database and click the edit icon.
Click maintenance in the left panel and check the checkbox Enable circular logging. Click Save.
A warning message will appear. The database needs to be dismounted and remounted before circular logging changes are applied. Click OK to close the warning message.
Warning
Circular logging parameter change will not be applied on this database before it is remounted. Dismount and remount database “Mailbox Database” in order to apply this parameter change.
Click the mailbox database and click the … icon. Click Dismount.
A warning will show up with the question if you are sure to dismount the mailbox database? Verify the name of the mailbox database and click Yes.
Have a look at the STATUS and verify that the mailbox database is Dismounted.
Mount the database. Click the … and click Mount.
A warning message will appear if you are sure to mount the mailbox database. Verify that it’s the correct mailbox database. When confirmed, click Yes.
Have a look at the STATUS and verify that the mailbox database is mounted.
Results after enabling circular logging
Let’s go back to the Mailbox database folder and have a look at the logs.
All the database logs of that specific mailbox database cleared successfully.
Enable circular logging Exchange with PowerShell
Run Exchange Management Shell as administrator. Check if circular logging is enabled on the mailbox database. We will run the Get-MailboxDatabase cmdlet.
The output shows that circular logging is disabled.
[PS] C:\>Get-MailboxDatabase "Mailbox Database 1237333779" | Format-Table Name, CircularLoggingEnabled
Name CircularLoggingEnabled
---- ----------------------
Mailbox Database 1237333779 False
We will run the Set-MailboxDatabase cmdlet and CircularLoggingEnabled parameter to enable circular logging.
[PS] C:\>Set-MailboxDatabase "Mailbox Database 1237333779" -CircularLoggingEnabled $True
WARNING: Circular logging parameter change will not be applied on this database before it is remounted. Dismount and remount database "Mailbox Database 1237333779" in order to apply this parameter change.
After running the command, a warning message will appear. The database needs to be remounted before circular logging changes are applied.
Warning
Circular logging parameter change will not be applied on this database before it is remounted. Dismount and remount database “Mailbox Database” in order to apply this parameter change.
Let’s dismount the database and mount the database to have the changes being applied. Let’s verify the mount status after each command.
[PS] C:\>Dismount-Database "Mailbox Database 1237333779" -Confirm:$False
[PS] C:\>Get-MailboxDatabase "Mailbox Database 1237333779" -Status | Format-Table Name, Mounted
Name Mounted
---- -------
Mailbox Database 1237333779 False
[PS] C:\>Mount-Database "Mailbox Database 1237333779" -Confirm:$False
[PS] C:\>Get-MailboxDatabase "Mailbox Database 1237333779" -Status | Format-Table Name, Mounted
Name Mounted
---- -------
Mailbox Database 1237333779 True
That’s it!
Keep reading: Truncate Exchange logs with PowerShell »
Conclusion
You learned how to enable circular logging Exchange Server with PowerShell and Exchange Admin Center. You also learned how to enable circular logging in Exchange Admin Center. Don’t forget to remount the mailbox database before the change takes effect.
Did you enjoy this article? You may also like to read Create email address policy in Exchange Server. Don’t forget to follow us and share this article.
This Post Has 0 Comments