Solved

Thousands of transaction logs

Posted on 2010-09-20
20
769 Views
Last Modified: 2012-05-10
Hello, we are running exchange 2010. The database hasn't been backed up by any exchange aware applications and therefore the transaction logs haven't been purged out. Now we have thousands of transaction logs which is making our first exchange aware backup take forever. I've ready about people withe the same issues and their backups took weeks because of all the transaction logs. My question is, could I move most of my logs to another location and then run my backup? Are there any problems with doing this? I can't have the initial backup take weeks.
0
Comment
Question by:StarfishTech
  • 7
  • 6
  • 4
  • +2
20 Comments
 
LVL 32

Accepted Solution

by:
endital1097 earned 125 total points
Comment Utility
you have a couple of options
1, dismount the database, run eseutil /mh to determine logs required, manually delete any log older than reported
2. enable circular logging to purge logs then disable
0
 

Author Comment

by:StarfishTech
Comment Utility
Do I have to dismount the database to run eseutil? I'm just worried that if I dismount the database, it won't remount.
0
 
LVL 3

Assisted Solution

by:Andre Thibodeau
Andre Thibodeau earned 125 total points
Comment Utility
Yes you do.

Like endital mentioned above, dismount the database, run "eseutil /mh databasename.edb", if you see 'Clean Shutdown' and you probably will, then all logs have been committed to the database.  You can then delete (move) all of the log files.  If you have multiple databases located in the same directory structure take care in the log file names and which ones you are deleting.

Unless you have other issues on the go, re-mounting a database with a clean shutdown should not cause you any issues.

If for some reason you have a dirty shutdown, you can preform a Soft Recovery, note the recovery is from the first log file (ie:EOA) you can see this in the read out from the eseutil /mh command, see eseutil docs for more details.   Log files for each storage group are distinguished by file names with numbered prefixes (for example, E00, E01, etc). Log files are numbered in a hexadecimal manner, but reported in the eseutil in decimal format. You can convert log file sequence numbers to their decimal values by using the Windows Calculator (Calc.exe) application in Scientific mode.  To view the decimal sequence number for a specific log file, you can examine its header by using the Exchange Server Database Utilities (Eseutil.exe) tool. The first 4k page of each log file contains header information that describes and identifies the log file and the databases it belongs to. The command Eseutil /ml [log file name] displays the header information. If a database is in a Dirty Shutdown state, all existing transaction logs from the checkpoint forward must be present before you can mount the database again. If these logs are unavailable, you must repair the database by running the command Eseutil /p to make the database consistent and ready to start.
If you have the log files, you can preform a soft recovery eseutil /r E0A /d "S:\Program Files\Microsoft\Exchange Server\DatabaseFolder" /l "L:\Program Files\Microsoft\Exchange Server\LogFolder" /a /8
Note.  Just specify the first log file, and do not put the extension ‘.log’, also you do not need to specify the database name, just the location.

AT
0
 
LVL 12

Assisted Solution

by:jjmartineziii
jjmartineziii earned 250 total points
Comment Utility
I had this EXACT problem last week.

I moved the logs like you are asking out the directory to a mapped drive.

Later that night, i clicked circular logging and dismounted and remounted the database. That deletes all the transaction logs. Don't try to delete them because it will drag on forever.

0
 
LVL 2

Expert Comment

by:ViTaMiN
Comment Utility
Be aware that if you enable circular logging permanently you would need a continious backup solution or else you are not able to restore your database to the latest state in case of trouble.
solution would be to enable and then disable circular logging (with dbase (dis)mount in between)
or just backup the logfiles with a generic backup tool wichs changes the attribute of the file, exchange management should delete the backed up files at the next maintenance run.
0
 

Author Comment

by:StarfishTech
Comment Utility
So if I enable circular logging just so I can purge these logs, when should I disable it again? The dilemma is that we had tons of logs to the point where we had to move some of them to another partition since it filled up the initial partition. Now the windows backup won't properly backup exchange or purge the logs probably because not all of the log files are there. Sounds like circular logging is a much easier way for me to go - however I just don't understand how circuiar logging can get rid of all the transaction logs without some kind of negative impact.
0
 
LVL 12

Assisted Solution

by:jjmartineziii
jjmartineziii earned 250 total points
Comment Utility
Yes, if you:
1) enable circular logging
2) dismount the db
3) mount it again,
4) disable logging
5) dismount the db
6) mount it again

You would have cleared all the transaction logs and started to log them again.

I'm not a backup expert but if you are able to do a full backup after step 6, you don't NEED those transaction logs unless you have to restore to a db state before said full backup.
0
 

Author Comment

by:StarfishTech
Comment Utility
ok, but is there risk of data loss here?
0
 
LVL 32

Expert Comment

by:endital1097
Comment Utility
yes, if you enable circular logging then were to lose the database before a backup, you would lose all data between the last backup and now
0
 

Author Comment

by:StarfishTech
Comment Utility
ok, we plan on enabling circular logging to clear all the logs. We will then disable circular logging and run an immediate backup. I just wanted to make sure that enabling circular logging all on its own wouldnt result in data loss
0
How does your email signature look on mobiles?

Do your employees use mobile devices to reply to emails? With mobile becoming increasingly important to the business world, it is in your best interest to make sure that your email signature looks great across all types of devices.

 
LVL 12

Expert Comment

by:jjmartineziii
Comment Utility
No it won't unless, like endital1097 says, you lose the data before a full backup.

I can confirm this as I recently did this.
0
 

Author Comment

by:StarfishTech
Comment Utility
i have 3 mailbox databases. Should i do them all at the same time or one at a time?
0
 
LVL 32

Expert Comment

by:endital1097
Comment Utility
i would do it one at a time
0
 
LVL 12

Expert Comment

by:jjmartineziii
Comment Utility
Matter of choice.

I personally would do one at a time.
0
 
LVL 32

Expert Comment

by:endital1097
Comment Utility
any update on the status
0
 

Author Comment

by:StarfishTech
Comment Utility
Yes, it worked great! Thanks for everyone's help. I do have one last question. Now that the logs are manageable, I've started to backup the exchange database using windows 2008 server backup. I would like for the backup to automatically flush the log files so that this is never an issue again. If I run a ONE TIME BACKUP, it does give me the option to do a VSS full backup which will clear the logs - however if I create a scheduled backup, it doesn't give me this option. Will it just automatically flush the logs? How can I tell that it is doing this? How many transaction logs is a healthy amount?
0
 
LVL 32

Expert Comment

by:endital1097
Comment Utility
0
 

Author Comment

by:StarfishTech
Comment Utility
Unfortunately this guy took these screen shots from 2008 R2. Apparently, for whatever reason, Windows 2008 R2's Backup is a little different. It allows you to chose specific files for backup unlike 2008 standard sp2.
0
 
LVL 32

Expert Comment

by:endital1097
Comment Utility
i think there are limitations with 2008 non-r2
i'm looking into it
0
 
LVL 2

Expert Comment

by:ViTaMiN
Comment Utility
Hello,

I had this issue once, if I remeber correctly you need tgo register the exchange vss writer with windows backup. here's a link (in Dutch).
Let me know If you need help.
http://www.wardvissers.nl/2009/09/29/windows-server-backup-applications-grijs-vss-snapin-exchange-2007-sp2/
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
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…
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

771 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

11 Experts available now in Live!

Get 1:1 Help Now