Solved

exchange 2010 won't purge logs

Posted on 2013-10-28
22
273 Views
Last Modified: 2013-11-06
my exchange 2010 database just doubled in size. i cant seem to figure out why. the EDB file is only 125 GB but the mailbox database folder is showing 235GB.

i only have a few hundred megabytes left and my users cannot send or receive mail.

please help.
0
Comment
Question by:datatechdc
  • 11
  • 6
  • 4
  • +1
22 Comments
 
LVL 15

Expert Comment

by:Skyler Kincaid
ID: 39607746
You need to run a backup to an external drive right away. You can use Windows Server backup. What backup program do you normally use? Log files are truncated when a backup is execute.

You need to configure Windows Server backup right away after you plug in an external drive. Once the backup completes the logs will truncate and clear space. If the drive fills up then you will be in huge trouble and you might end up losing messages.

Configure the backup right now and run a backup. Do a full system backup just in case something goes wrong.

You could also download a trial version of BackupAssist to run the backup:

http://www.backupassist.com/BackupAssist/download.php
0
 

Author Comment

by:datatechdc
ID: 39607754
i configured a network share and mapped it.

i am running windows backup but only of the database folders, not the entire server.
will that work?
0
 

Author Comment

by:datatechdc
ID: 39607755
i have had the backup running for over an hour and its still checking for consistency.
0
 
LVL 15

Expert Comment

by:Skyler Kincaid
ID: 39607769
That is bound to happen if there isn't enough room for new logs. If the backup fails your next option is to:

DISCLAIMER: YOU MAY LOSE EMAILS IN THIS PROCESS BUT IF ALL GOES WELL THE DATABASE WILL STILL MOUNT

1. Stop the Exchange Information Store service (this will probably hang on stopping because of the log issues)
2. If it doesn't stop after say, 30 minutes, you will need to end the store.exe process.
3. THIS STEP IS IMPORTANT: You need to verify that the database is in a clean shutdown state to avoid losing emails. You need to open command prompt and run this command:

eseutil /mh "c:\...\Mailbox Database 0436312751.edb"

Open in new window

or whatever the location and name of your database is.
4. You need to look through the output for this line:

State: Dirty Shutdown

Open in new window

but if you are lucky it will say Clean Shutdown

5. DON'T FREAK OUT JUST YET IF IT SAYS DIRTY, start the Information Store Service, let it run a few seconds and then stop it again, it should stop quickly.

6. Run the command again to check the database reference in step 3, and hopefully it will say:

State: Clean Shutdown

Open in new window


7. If it says clean then you can remove all the log files from the location of the database and new logs will be created. They should end in .log and be around 1MB a piece. I would move them to an external drive just in case things don't go right.

Give that a try and I will try and stay up to help you if that doesn't work.
0
 
LVL 15

Expert Comment

by:Skyler Kincaid
ID: 39607806
Any updates?
0
 
LVL 4

Expert Comment

by:Satish Auti
ID: 39607812
First of all you need to take exchange backup completely.

Also check if back pressure events  (Event ID: 15006
, 15004) are there on server. If yes then please move queue folder to another drive.

To resolve back pressure issue follow below link.

http://www.petri.co.il/back-pressure-moving-queue-database-in-exchange-2007.htm
0
 
LVL 63

Expert Comment

by:Simon Butler (Sembee)
ID: 39608200
There is no need to do any manual deletion of the log files.
If the database is mounted, then just enabled circular logging. Then dismount and remount the database. That will flush the logs out over the next hour or so.
If the database will not mount, then you can compress the oldest log files. Select a bunch of them, right click and choose properties. Choose compress.
DO NOT compress the database, the newest files, or anything that isn't a log file.

Then complete the backup as normal. Once complete, you can then disable circular logging.

Then look at this blog posting on how to troubleshoot the issue:
http://blogs.technet.com/b/exchange/archive/2013/04/18/troubleshooting-rapid-growth-in-databases-and-transaction-log-files-in-exchange-server-2007-and-2010.aspx

Simon.
0
 

Author Comment

by:datatechdc
ID: 39608324
i just finished copying the log files to another drive. should i not delete them?
0
 

Author Comment

by:datatechdc
ID: 39608366
i deleted only a few GB of the log files (oldest). i can receive emails now, but it will not send. keeps saying server timed out.
0
 
LVL 63

Accepted Solution

by:
Simon Butler (Sembee) earned 334 total points
ID: 39608382
Copying/Moving the logs to another drive is a complete waste of time.
Deleting the logs is also a very bad thing to do.
Exchange needs to know where they are and needs them to be complete.

There are only two valid ways to remove logs:

- Run a backup
- Enable circular logging.

By deleting the logs you have removed the first option - a backup isn't going to complete successfully now, because the logs are out of sync.

You can try the circular logging method, but otherwise the worse case scenario is that you have to take the database down and run a repair on it.

There aren't any shortcuts to get things working correctly. People try (like deleting logs) but all that does is give you a short term fix for potentially a lot of work later to resolve the problem.

Simon.
0
 

Author Comment

by:datatechdc
ID: 39608397
how do i go about enabling the circular logging method for exchange 2010?

i made a backup of the log files before deleting them, they are all still available. the backup i was trying to run would not run and it seems because there was not enough space available.
0
Shouldn't all users have the same email signature?

You wouldn't let your users design their own business cards, would you? So, why do you let them design their own email signatures? Think of the damage they could be doing to your brand reputation! Choose the easy way to manage set up and add email signatures for all users.

 
LVL 63

Expert Comment

by:Simon Butler (Sembee)
ID: 39608405
Right click on the database in EMC and it is one of the options. After doing so you will need to dismount and then remount the database for the change to take effect.

Simon.
0
 
LVL 15

Expert Comment

by:Skyler Kincaid
ID: 39608508
If the database is in a clean shutdown state the log files are not needed because all the transactions have already been committed to the database.

He still had time with the small amount of space left before major problems would start happening. The important part as I described is to make sure it is in a clean shutdown state, move the logs and then run a backup right away.

I have done this quite a few times with no issues.
0
 

Author Comment

by:datatechdc
ID: 39608603
i made sure the database was in a clean shutdown mode.

i have brought it back up and rebooted.

now my users are having trouble opening their OWA mailboxes. keeps saying mailbox is unavailable or server connection timed out.
0
 

Author Comment

by:datatechdc
ID: 39608606
having trouble opening EMC on the server as well.
0
 

Author Comment

by:datatechdc
ID: 39608663
ok looks like i just had to give it some time. everything seems to be working now.
0
 
LVL 15

Assisted Solution

by:Skyler Kincaid
Skyler Kincaid earned 166 total points
ID: 39608715
You need to run a full backup of the server right away. If the database was in a clean shutdown state then you can delete the logs, wherever you moved them too.

When you run the full backup it will truncate the rest of the logs. I would recommend setting up a check for a successful back and periodically checking the status to verify that everything is working as it should and the logs are being truncated.

Good job on getting through it and hopefully it doesn't happen for you again in the future!

I am sure your mail queues were packed full so it had some catching up to do.
0
 

Author Comment

by:datatechdc
ID: 39608731
so i did not delete logs for one of the databases.

should i enable circular logging on all databases first? then once it removes the logs can i use windows server backup to do the backup?
0
 
LVL 15

Expert Comment

by:Skyler Kincaid
ID: 39608790
You can definitely do that to clear the logs but you should not leave it enabled. If you have time to run the backup and an external drive or other drive with free space then it would be a better idea.

Plus it doesn't sound like you have had a successful back in awhile so you should do that right away.
0
 

Author Comment

by:datatechdc
ID: 39608798
i can't do anything until later tonight when the users finish working.
0
 

Author Comment

by:datatechdc
ID: 39608800
how quickly does the circular logging get rid of the log files after enabling it?
0
 
LVL 63

Assisted Solution

by:Simon Butler (Sembee)
Simon Butler (Sembee) earned 334 total points
ID: 39614828
Usually within 30 minutes or so.

Simon.
0

Featured Post

Free book by J.Peter Bruzzese, Microsoft MVP

Are you using Office 365? Trying to set up email signatures but you’re struggling with transport rules and connectors? Let renowned Microsoft MVP J.Peter Bruzzese show you how in this exclusive e-book on Office 365 email signatures. Better yet, it’s free!

Join & Write a Comment

Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
This video discusses moving either the default database or any database to a new volume.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now