Solved

Thousands of transaction logs

Posted on 2010-09-20
20
770 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
ID: 33721567
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
ID: 33721740
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
ID: 33722091
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
ID: 33722271
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
ID: 33723561
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
ID: 33729272
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
ID: 33729820
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
ID: 33730290
ok, but is there risk of data loss here?
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33730304
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
ID: 33730355
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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 12

Expert Comment

by:jjmartineziii
ID: 33730359
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
ID: 33730573
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
ID: 33730584
i would do it one at a time
0
 
LVL 12

Expert Comment

by:jjmartineziii
ID: 33730587
Matter of choice.

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

Expert Comment

by:endital1097
ID: 33744405
any update on the status
0
 

Author Comment

by:StarfishTech
ID: 33744453
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
ID: 33744485
0
 

Author Comment

by:StarfishTech
ID: 33744599
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
ID: 33744816
i think there are limitations with 2008 non-r2
i'm looking into it
0
 
LVL 2

Expert Comment

by:ViTaMiN
ID: 33745843
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
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 show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

914 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

21 Experts available now in Live!

Get 1:1 Help Now