Link to home
Start Free TrialLog in
Avatar of melexchange
melexchange

asked on

how do you delete log files from exchange 2010

Hi, I am facing some challenge with exchange 2010 as the log files are eating into my disk space. The EDP file is 32GB but the log files are of 192GB. This is forcing me to run out of space. Please let me know the best way to delete the log files?
ASKER CERTIFIED SOLUTION
Avatar of mattyb_
mattyb_

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of melexchange
melexchange

ASKER

No, we have not done till date although we tried once but it took around 3-4 hours in reading. We though it is struck hence cancelled the process. Probably it is taking too much time in reading. What is best option to resolve this?
Avatar of Miguel Angel Perez Muñoz
Make a full database backup and logs must be erased by itself
Unfortunately it will have to be one of those things you have to wait and put up with.

Have a look at what your backing upto, there may be a bottle neck there. Slow external USB drive, slow network connection, slow tape drive etc.

In addition, the backup will take longer the more in use the server is. Look at starting it on a Friday night to run over the weekend. A backup during working hours is a no no unless essential.
You can manually truncate the logs if necessary, but keep in mind that there are two concerns with doing this process:

1) If a failure occurs between the truncation time and the next successful backup, you will be unable to recover.
2) You must create a scheduled maintenance window and disrupt service to the users to perform this procedure.

WARNING -- THIS OPERATION CANNOT BE UNDONE
To manually truncate the logs, perform the following steps:
1) Login to the Exchange server using Remote Desktop (or a KVM)
2) Open an elevated command prompt by right-clicking Command Prompt in the Start menu and selecting "Run as Administrator"
3) Type NET STOP MSExchangeIS and press the enter key (This will stop the Microsoft Exchange Information Store service.  NOTE: USERS ARE NOW UNABLE TO ACCESS MAIL.)
4) Change folders so that you are in the same directory as the EDB file for the database whose logs you wish to truncate.
5) Run ESEUTIL /MH "DatabaseName.edb" (where DatabaseName.edb is the edb file for the database in question)
6) You will receive a large amount of output.  Look for a line that says "Required Logs".  If the database is in a clean shutdown state, this line should read 0-0 and may be either decimal or hexadecimal.
7) If Required Logs is a decimal number (not 0-9 and A-F), open calculator and convert the numbers to hexadecimal.  This will give you the log file sequence numbers that are required by the database to successfully mount.
8) Upon confirmation of the value of Required Logs, change folders to where your logs are stored.
9) Create a new temporary folder calle "Truncated Logs"
10) Move all log files older than 48 hours into the Truncated Logs folder.
11) Run NET START MSExchangeIS (Upon success, users will now be able to access their mailboxes)
12) Open the Exchange Management Console and verify that all databases are mounted.  If the database whose logs you truncated is mounted, then you may delete the logs you moved to the "Truncated Logs" folder.  If the database is not mounted, then some of the log files moved to the Truncated Logs folder are still required by the DB and you must review the MH output again to verify the log sequences required to mount.