Wednesday, December 10, 2014

How to manually remove Exchange Server Log Files

It is well known that Exchange Server transaction logs keeps the full record of the performed changes in the Exchange Server database, and these log files should be periodically removed from the hard disk because these log files gather or acquire all the available free disk space.

Usually, the size of Exchange transaction log file is fixed, exact 5MB, for MS Exchange Server 2003 and all earlier versions. If the particular transaction log is full, it is renamed with a numeric sequence number and a new current log is generated. Here the current transaction log is the most recently created by Exchange Server.

These transaction logs are being called from different names corresponding to MS Exchange version. For example, In MS Exchange Server version 5.5, the current transaction log file is called Edb.log and for Exchange Server version 2000 and 2003, the current log is named with the Storage group prefix.

There are some in-built methods in Exchange which removes the unnecessary log files automatically which are as follows: 

When circular logging is enabled: This method removes transaction logs after they have been removed written to the database group.
When circular logging is disabled: This method removes excess logs after a complete or full online backup of all the databases in a storage group is performed. 

However, sometimes you have to manually remove the transaction log files when you anticipate running out of hard disk. If removing a log which holds data that hasn't been written on Exchange database file, then database databases will no longer be mountable after an abnormal stop.

In order to remove the transaction log files manually, there are certain prerequisites that you need to accomplish before remove Exchange Server transaction log files-

a    a)  Database states: Before the manual removal of any transaction log files, you should determine the state of the particular database which you are using. There are two states possible one is ‘attach’ which means that Exchange Server database has not been shut down correctly, and another is ‘detach’ means the database is shut down correctly.  The state of the database can be determined by using Eseutil utility’s/ MH command switch.

     b)  Storage groups: Before you begin the manual removal of Exchange transaction log file, initially you should verify that each database is in a Clean Shutdown (Consistent) state. In Storage groups, Exchange Server databases are organized where these databases share a single transaction log file stream.

Below is a complete set of steps to remove the excess transition log files manually:

1    1)    Give a halt to the entire databases in the storage group.
2   2)    Now the verification of the state of each database in the particular storage group is done.
3    3)    Execute one of the following actions:
·   If one or more of the databases are found in the Inconsistent (Dirty Shutdown) state, analyze which transaction log files can be removed without affecting consistency
·  If all the databases are found in the Consistent (Clean Shutdown)state then you can remove the entire transaction log files except the current one.
4   4)  Now at last, copy all the transaction which you want to remove to a different location before removing them permanently from the transaction log hard disk.

So this is the most simple and secure method to remove the excessive Exchange Server transaction log files manually, it is highly recommended.

No comments:

Post a Comment