Secondary Database Replay

A secondary database automatically replays all phases of a schema instantiation, including any replayable database reorganization performed on the primary. A non-replayable reorganization, as the name implies, is not replayed by a secondary database; database tracking halts when it encounters the audit discontinuity record. (For details, see "Secondary Database Availability", in the following section.)

When database tracking has halted at an audit discontinuity record, query applications can still access the database although you will need to eventually re-establish the secondary database from a post-instantiation backup of the primary, to enable database tracking to continue beyond the discontinuity.

While a primary database is open and active with updating transactions in progress, journals continue to be generated and transferred to connected secondary servers. A secondary database enters a reorganization mode when it replays the first reorganization control record. The replay of a reorganization on a secondary processes through several states that can be interrogated by using the SDS Administration application. For details, see "Using the SDS Administration Application", in Chapter 1 of the JADE Synchronized Database Service (SDS) Administration Guide.

The first reorganization replay state is Seeking Approval. While in the Seeking Approval state, database tracking scans ahead through journals looking for specific reorganization control records, without replaying any reorganization operations or database updates. Essentially, replay is paused until the disposition of the reorganization process on the primary has been determined. Tracking remains in the Seeking Approval state until an initiate transition or an abort reorganization audit record is processed.

The reorganization proceeds only when an initiate transition audit record is processed. This record signifies that the online phases completed on the primary and an initiate transition audit record was executed. However, if an abort reorganization audit record is encountered, the secondary splices out the failed reorganization and continues with normal replay, applying any updates that occurred during the failed or aborted reorganization.

A structural change to a class made in the JADE development environment on the primary system or loaded using the Schema Load utility (that is, jadload and jadloadb) with the Only Structural Versioning load style does not cause it to be versioned if it has no persistent instances. However, a special audit record is output to the journal.