6.12. Rebuilding a Database File from Logs
Problem
One of your databases has become corrupt and you want to restore it using only the transaction log files.
Solution
Using a graphical user interface
Ensure that you have all log files from E0000001.LOG through the anchor log. If you don't have every log file created since the database was created (either because you lost one or because circular logging was on), you may have difficulty restoring the complete database contents.
Move or rename the EDB and STM files for the target database. Don't delete them; you may want to be able to return to them later.
Move the CHK files from the transaction log path for the SG. As with the EDB and STM files, your best bet is to keep these in case you need them.
Make sure the IS service is running, either by checking the Services control panel applet or looking in the application event log for event ID 1001.
Mount the target database.
The store will create new EDB and STM files with the appropriate name in the specified database location.
Wait for the IS to finish replaying the transaction logs.
Discussion
If you have an unbroken chain of transaction log files and PRIV1.EDB becomes corrupt, you can quickly and accurately recover the data store by dismounting the database and removing (or renaming, which is much safer) the existing CHK, EDB and STM files. When you attempt to remount the database, the IS will create new, empty EDB and STM files, then it will begin sequentially playing back log files to restore ...