Tutorials

Enable or disable circular logging and why and when you should do this

Enable or disable circular logging and why and when you should do this

If you are migrating from SBS 2008 with Exchange Server 2007 to Exchange Server 2013 or you are migrating from SBS 2011 with Exchange Server 2010 to Exchange Server 2016 the actual migration of the Mailboxes from the old server to the new server cause a tremendous amount of log files created if circular logging is disabled on the new server. This can cause drives to fill up and Exchange to stop working completely and if the database and log files are located on a System drive that can even lead to a non-bootable situation. It is best practice to always move the Database and Log files to a separate partition or drive as explained in How to move Exchange Server 2016 or 2013 mailbox database and logs to another drive.

Enabling circular logging on the new server can improve performance a bit during your migration so let us have a look at how we change that setting. If you have enough free space you can also keep circular logging disabled but you will need an Exchange-aware backup program that can flush logs after a backup has been made. A very good read on Exchange and backup is here Everything You Need to Know About Exchange Backups* – Part 1 – You Had Me At EHLO…

  1. From the Start menu start Exchange Administrative Center (EAC).
    How to enable or disable circular logging and why and when you should do this
  2. Login with your credentials
    How to enable or disable circular logging and why and when you should do this
  3. Go to Servers, Database and click the Pencil
    How to enable or disable circular logging and why and when you should do this
  4. Choose Maintenance and check ‘Enable circular logging’. Click Save.
    How to enable or disable circular logging and why and when you should do this
  5. Click OK
    How to enable or disable circular logging and why and when you should do this
  6. Choose ‘Dismount’.
    How to enable or disable circular logging and why and when you should do this
  7. Click Yes.
    How to enable or disable circular logging and why and when you should do this
  8. Status of the Database shows Dismounted. Choose to Mount the Database again.
    How to enable or disable circular logging and why and when you should do this
  9. Click Yes.
    How to enable or disable circular logging and why and when you should do this
  10. Check the setting now and it should have been set to enabled = Checked. Click Cancel to close this window.
    How to enable or disable circular logging and why and when you should do this
  1. We can do the same procedure with Powershell from within the Exchange Management Shell.
    How to enable or disable circular logging and why and when you should do this
  2. Type Get-MailboxDatabase | Fl Circularloggingenabled to see what the status is of Circularlogging. It is disabled and want to enable it again.
    Get-MailboxDatabase | Fl Circularloggingenabled
    How to enable or disable circular logging and why and when you should do this
  3. With Get-MailboxDatabase | Set-MailboxDatabase -CircularLoggingEnabled $true we enable Circular logging. With this command we enable Circular logging for ALL databases on this server.
    Get-MailboxDatabase | Set-MailboxDatabase -CircularLoggingEnabled $true
    How to enable or disable circular logging and why and when you should do this
  4. With Get-MailboxDatabase | Dismount-Database we unmount the Database and we use Get-MailboxDatabase | Mount-Database to mount all databases on this server.
    Get-MailboxDatabase | Dismount-Database
    Get-MailboxDatabase | Mount-Database
    How to enable or disable circular logging and why and when you should do this
  5. Once more we run Get-MailboxDatabase | Fl Circularloggingenabled to see what the status is.
    Get-MailboxDatabase | Fl Circularloggingenabled
    How to enable or disable circular logging and why and when you should do this

About server-essentials.com 

Server-essentials.com was established by Mariette Knap, an alumni Microsoft MVP. It serves as a community for IT Consultants and Business Owners who manage their own IT infrastructure, as well as for Employees who go the extra mile to ensure smooth operations. The forum is dedicated to discussions on all aspects of 'IT' and beyond. The documentation provided is of the highest quality and is crafted by and for the community.


Microsoft Partner

server-essentials.com
C. de Rijcklaan 1
3723 PM Bilthoven
The Netherlands 
Chamber of Commerce 90147480
VAT Id Number NL004793120B27