Preparing for application switchover

The following procedure ensures minimum data loss during a read-write application switchover.

Note

This process is currently applicable for Oracle to Oracle online migrations.

When both the source and target databases are open in a read-write mode during the logical migration work flow, the following conditions apply:

  • For read-only applications, switchover can happen immediately after GoldenGate Replicat has applied all outstanding source transactions, allowing for zero application downtime for those services.

  • Read-write applications require assurance that all transactions have been applied on the target before switching the application over to ensure minimum data loss.

If you have an active source database with a lot of active transactions and if your application is read-write, then you must do the following to ensure minimum data loss:

  1. If your source database is occupied with the application usage, incoming transactions, you can decide when to do the application switchover. OCI Database Migration Service ensures that the data is replicated from where you resume the migration.

    Pause the migration job after the Monitor replication lag phase.

    This phase monitors Oracle GoldenGate Extract and Replicat operations until Replicat has caught up on the target database.

  2. After the Monitor replication lag phase completes and the migration job pauses, stop the workload on the source database (start of downtime).

  3. You can initiate a switchover by resuming a migration which is at a Waiting state after the monitor replication phase.
    Note

    OCI Database Migration Service pauses a migration after the monitor replication phase. This gives you an option to resume the migration. However, if you do not pause the migration, OCI Database Migration Service automatically performs the switchover. When you resume the migration after the Monitor replication lag phase, the Switchover phase will be initiated.
    Note

    For production loads, Oracle recommends you to pause the migration after the Monitor replication lag phase.
    When you Resume the migration, OCI Database Migration Service performs the following tasks:
    1. Inserts a barrier transaction in the source database.
    2. Actively monitors the Extract and Replicat processes.
    3. Shuts off the Extract & Replicat processes.
    4. Checks if the barrier transaction was replicated to the Target database. This will also trigger the object types such as reload sequences, audit trails, materialized views, unsupported objects by Oracle GoldenGate, and the tables that you want to deliberately exclude from replication will be reloaded.
  4. After phase Switchover has completed, you can start the workload on the target database (end of downtime).