DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Data Engineering
  3. Databases
  4. Recovering an Exchange Database With Missing Log Files and Avoiding Dirty State Backup

Recovering an Exchange Database With Missing Log Files and Avoiding Dirty State Backup

A backup of the EDB file is available, but there are no transaction logs. How do we bring the DB back to a functional state? Will it be restored with changes made to it?

Vaibhav Bagga user avatar by
Vaibhav Bagga
·
Jan. 10, 18 · Tutorial
Like (2)
Save
Tweet
Share
12.74K Views

Join the DZone community and get the full member experience.

Join For Free

It has become an adopted theory that for recovering an Exchange database, log files should be available. In this article, we will discuss the importance of transaction log file availability and what can be done to recover an Exchange database when log files are missing.

Image title

Hypothetical situation: A backup of the Exchange database (EDB) file is available, but there are no transaction logs. How do we bring the database back to a functional state? Will the database be restored with all the changes made to it?

The most basic concept to understand is that by the time the Exchange database is mounted in the Server, it is in a dirty state — the reason being the number of transactions that will take place in the database (i.e. sending or receiving messages, changes in the state of the email like read or unread, deleting or moving messages from a folder, etc). Therefore, if the backup is done while the database is mounted on the Server, it will definitely be in a dirty state (despite the type of backup). The requirement of log files for recovery depends on how the database is being backed up. 

If the backup is made while the database is online or a shadow copy is created using an application that's not compatible with Exchange, then along with the possibility of backup being in a dirty state, it may also be corrupt. If the database is copied without bringing it into an inactive state, then some of the transactions must be in process with the memory and not yet written to the database. Therefore, the backup created might have an inconsistent state.

If it is in a dirty state and log files are available, then uncommitted transactions can be rolled up and all changes done to the database will be reflected. However, if no log files are available, then the best option is to go through the repair process using the ESE utility /p switch. The ESEUTIL command can help you repair the Exchange Server database caused by a dirty shutdown.

Image title

If the backup is created using an Exchange-supported backup application while the database is online, then it will definitely be in a dirty state — but there is a lower chance that it will be corrupt. In this case, the backup can be restored and all uncommitted transactions will be replayed against it in order to bring the database back into a functional state. For this, it's mandatory that log files in the sequence are available to roll back the database.

To ensure that backup is not inconsistent, dismount the database before backing it up (i.e. create an offline backup). When the database is brought into an offline state, there are no uncommitted transactions and thus it is possible to recover Exchange database with missing log files. However, this option has a downside, too. First of all, you have to dismount the database, which means downtime for long hours. Also, transaction logs generated after backup creation will not be available, which means you may not get the most updated database backup in the operational state.

The requirement of log files in order to recover an Exchange database depends on what type of backup is created. If the backup is available but it is in a dirty state, then to get the most updated database back, it is important to have all log files in a healthy state. In a scenario where the database is in a dirty shutdown state, log files are missing, and you are not willing to go through the repair process, then you may want to look for software.

Database Backup

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Unlocking the Power of Polymorphism in JavaScript: A Deep Dive
  • Upgrade Guide To Spring Data Elasticsearch 5.0
  • How To Generate Code Coverage Report Using JaCoCo-Maven Plugin
  • Public Cloud-to-Cloud Repatriation Trend

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: