Database Backup and Recovery
Overview
Universal Agent databases, on operating system's other than IBM i, are implemented using Oracle's Berkeley Database product.
Recovering from database corruption requires the following steps:
- Dump the corrupted database to a file using the Universal Database Dump utility.
- Reload the database from the dump file using the Universal Database Load utility.
Database corruption can occur if the system or address space that is managing the databases ends abnormally. A Universal Agent program that utilizes databases should not be terminated abnormally.
Abnormal methods of termination include:
- z/OS CANCEL or FORCE command.
- UNIX SIGKILL signal.
- Windows process termination through the Task Manager.
Database Backups
Database recovery is not a replacement for database backups. If the data maintained by the product in the database has long term value, the databases must be periodically backed up.
General Database Recovery Procedures
Generally speaking, database recovery follows the same steps independent of platform and database file.
Multiple attempts may be necessary in order to successfully recover from database corruption. Stonebranch Inc. recommends that you begin with the least aggressive recovery method and only proceed to more aggressive methods if necessary.
For the first recovery attempt, execute the Universal Database Dump utility with the -r (lowercase) command line option. This option instructs the utility to recover as much data as possible. Depending on the extent of database corruption, this may result in a recovered database with some incomplete key/data pairs.
Reload the database using the Universal Database Load utility, and specify the -o option. This option instructs the utility to remove the underlying database file, which results in a clean reload from the dump file.
If the database passes validation when you restart the application, it is likely that all data was successfully recovered and no additional recovery attempts are necessary.
If the database fails validation, rerun the Universal Database Dump utility and omit the -r option. This results in a dump of only the most complete data. While this improves the chances for successful recovery, some data loss is likely. Rerun the Universal Database Load utility and restart the application.
If both recovery attempts fail, you may delete the corrupted database and restart the application. This results in a total loss of data, but will allow the application to execute. The application will create the missing database during startup.