?
Solved

Thousands of transaction logs

Posted on 2010-09-20
20
Medium Priority
?
778 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
  • 4
  • +2
20 Comments
 
LVL 32

Accepted Solution

by:
endital1097 earned 500 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 500 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
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 
LVL 12

Assisted Solution

by:jjmartineziii
jjmartineziii earned 1000 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 1000 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
 
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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
This video discusses moving either the default database or any database to a new volume.
Suggested Courses
Course of the Month14 days, 14 hours left to enroll

770 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