Following the physical restore, logical recovery can further restore tables to a user-specified point in time. To do this, the archecker utility reads backed-up logical logs, converts them to SQL statements, and then replays these statements to restore data. The archecker utility cannot replay transactions from the current log. Before performing a logical recovery, ensure that all transactions you want to restore are contained in backed-up logical logs.
When performing a logical restore, archecker uses two processes that run simultaneously:
To collect the pertinent logical log records, the stager performs the following steps:
The stager reads the backed-up logical log files and assembles complete log records.
Any log record that is not applicable to the tables being restored is rejected.
If the logical log record is not rejected, it is inserted into a stage table.
The applier reads data from the control table created by the stager. It begins processing the required transaction and updates the control table to show that this transaction is in process. Next, it operates on each successive log record, row by row, until the transaction commits.
All updates to the control table occur in the same transaction as the log record modification. This allows all work to be completed or undone as a single unit, maintaining integrity at all times. If an error occurs, the transaction is rolled back and the error is recorded in the control table entry for this transaction.
After the applier has finished and the restore is complete, these columns, and any indexes created on them, are dropped from the destination table.
Consider the following issues when performing a logical restore: