Enable circular logging in Exchange Server
Thank to: https://www.alitajran.com/
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 gets 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 will 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 will enable circular logging in Exchange mailbox database.
Enable circular logging Exchange in EAC
To enable circular logging in Exchange Admin Center, follow these steps:
1. Sign in to Exchange Admin Center (EAC).
2. Go to servers > databases.
3. Click the mailbox database and click the edit icon.
4. Click maintenance in the left panel.
5. Check the checkbox Enable circular logging.
6. Click Save.
7. 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.
8. Click the mailbox database and click the … icon.
9. Click Dismount.
10. A warning will appear with the question if you are sure to dismount the mailbox database? Verify the name of the mailbox database and click Yes.
11. Look at the STATUS and verify that the mailbox database is Dismounted.
12. Mount the database. Click the … and click Mount.
13. 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.
14. Look at the STATUS and verify that the mailbox database is mounted.
Enable circular logging Exchange with PowerShell
To enable circular logging with PowerShell, follow the below steps:
1. Run Exchange Management Shell as administrator.
2. Check if circular logging is enabled on the mailbox database and run the Get-MailboxDatabase cmdlet.
The output shows that circular logging is disabled.
3. Run the Set-MailboxDatabase cmdlet and CircularLoggingEnabled parameter to enable circular logging.
4. 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.
5. Let’s dismount the database and mount the database to have the changes applied. Let’s verify the database mount status after each command.
Enable circular logging on specific Exchange Server
If you want to enable circular logging on all the mailbox databases that are mounted on a specific Exchange Server, follow these steps:
1. Run Exchange Management Shell as administrator.
2. Enable circular logging on all mailbox databases mounted on the specific Exchange Server.
3. Check that circular logging is enabled on all mailbox databases on the specific Exchange Server.
4. Dismount all the mailbox databases on the specific Exchange Server.
5. Check that all mailbox databases are dismounted on the specific Exchange Server.
6. Mount all the databases on the specific Exchange Server.
7. Verify that the mailbox databases are mounted on the specific Exchange Server.
Results after enabling circular logging
Let’s return to the mailbox database folder and look at the logs.
All the database logs of that specific mailbox database cleared successfully.
That’s it!
Comentarios
Publicar un comentario
Dime si la información de este blog te sirvio.