Use this procedure to synchronize an Oracle source database with an Open Target database. SharePlex replicates the Oracle data changes and maintains them in the Post queue until the target is established with the copy. When the target is ready, you run the SharePlex reconcile feature, which ensures that Post only applies the operations that occurred after the copy and discards operations that were committed to the source before the copy.
Preliminary considerations
Read these points before you proceed.
Supported databases
Oracle source and any supported target
Supported replication strategies
All
Requirements
-
You can use your Oracle RMAN backup system to take a hot backup of your primary instance and recover to an SCN or sequence number in a staging instance.
- This document does not provide instructions for how to perform the chosen copy method. Someone with expertise in database copy methods should perform this procedure. You can use Toad Data point or a third-party tool to extract data from the staging instance into the Open Target database.
- Read the requirements for activating a configuration file. For more information, see Requirements for Activating a Configuration.
- Before you start, review this procedure and see theSharePlex Reference Guide for more information about the commands that are used.
Procedure
- On the source and target systems, start sp_cop and sp_ctrl from the bin sub-directory of the SharePlex product directory.
-
On source and target systems, verify that the SharePlex processes are running.
sp_ctrl> status
-
On the target system, stop the Post process. This allows replicated data to accumulate in the post queue until the target database is instantiated and reconciled.
sp_ctrl> stop post
-
Activate the configuration on the source system.
sp_ctrl> activate config filename
-
On the source system, monitor activation status.
Note: The command retains control of sp_ctrl until activation is finished.
- When activation is complete, start the hot backup to the staging instance.
-
When the hot backup is finished, switch log files on the primary source system twice.
On-premises database:
svrmgr1> alter system switch logfile;
svrmgr1> alter system switch logfile;
Amazon RDS database:
Run the Amazon RDS procedure rdsadmin.rdsadmin_util.switch_logfile twice.
- Copy the archive logs that were generated by the log switch from the primary instance to the staging instance.
-
Do one of the following:
- If the source is RAC, recover the database on the staging server to the latest SCN of the last archive log that was copied to the staging server.
-
If the source is not RAC, recover to the sequence number of the last archive log that was copied to the staging server.
Note: The next steps apply the replicated changes that occurred after the backup point.
-
Do one of the following:
- If the source is RAC, make a note of the SCN that you recovered to on the staging server.
-
If source is non-RAC, make a note of the log sequence number that you recovered to on the staging server.
- Using the copy method of your choice, make a copy of the Oracle data from the staging server to the Open Target database. Wait until the copy is finished before proceeding to the next step.
-
[Optional] If you are using named post queues and are unsure of the queue names, issue the qstatus command and make a note of them.
sp_ctrl> qstatus
- On the target system, disable triggers on the target tables.
- On the target system, disable check constraints and scheduled jobs that perform DML.
-
On the target system, run sp_ctrl, then issue one of the following reconcile commands. If you are using named post queues, issue the command for each one.
-
If the source is non-RAC, reconcile to the log sequence number of the log that you noted previously.
sp_ctrl> reconcile queue queuename for datasource-datadest seq sequence_number
Example: reconcile queue SysA for o.prod1-r.rep1 seq 1234
-
If the source is RAC, reconcile to the SCN that you noted previously.
sp_ctrl> reconcile queue queuename for datasource-datadest scn scn_number
Example: reconcile queue SysA for o.prod1-r.rep1 scn 0123456789
Note: The command retains control of sp_ctrl until the reconcile process is finished.
-
-
On the target system, start the Post process. The two instances are now in synchronization, and SharePlex will continue replicating to maintain synchronization.
sp_ctrl> start post