Sequence for Fully Recovering Block Storage Databases

When you restore a database from a backup, the state of the restored database is exactly as it was when the backup was performed. Any transactions that took place after the backup are not recovered. Transaction logging captures ongoing transactions. These transactions can be replayed to recover the database to its most recent state.

A typical sequence for using these two features is to enable transaction logging and then back up a database. After restoring the backed-up database, you can replay the logged transactions that took place after the backup operation.

Transactions that reset the outline and data together (for example, clearing all loaded data and resetting the outline to empty) can be logged and replayed. See Table 7, List of Logged Transactions by Category for a list of transactions that can be logged and replayed.

Outline changes are not logged and, therefore, cannot be replayed. The outline itself, however, is saved as part of a backup. If you change the outline after backing up a database, after restoring the database and before replaying any logged transactions, you must copy the updated outline to the restored database. To avoid having the outline out of sync, Oracle recommends that you back up a database each time you change its outline. If you change a database outline without backing up the database, you should make a manual copy of the changed outline that you can copy it to the restored database before replaying transactions.

Table 3 is an example of how to use these features in tandem.

Table 3. Example Sequence for Using Backup and Restore and Transaction Logging and Replay

Time Period(Sequence ID) Transaction or Event
T0Enable transaction logging.
T1(1) Perform a data load.
T2(2) Calculate the database.
T3(3) Back up the database.
T4(4) Perform another data load.
T5(5) Update cells in a spreadsheet, and perform a lock and send to update the database.
T6(6) Calculate the database.
T7System failure results in a corrupted database.
T8

Restore the backup of the database taken at T3.

The restored database includes the results of transactions with sequence IDs of 1 and 2 but not those of 4, 5, and 6.

T9

Replay transactions with sequence IDs of 4, 5, and 6.

These transactions occurred after the backup was performed at T3 and before the database was corrupted at T7, and were not recovered when the database was restored at T8.

T10(7) Back up the recovered database.
T11Change the database outline.
T12(8) Back up the database or manually save the changed outline.