Supported databases
Oracle on all supported platforms
When to use this procedure
Use this procedure if the patch or upgrade makes DDL changes of a type not replicated by SharePlex. For a list of objects for which DDL is supported, see the SharePlex Release Notes.
Overview of the procedure
Use this procedure to run an Oracle hot backup to copy patches or upgrades from the source system to the target system, instead of applying the patch or upgrade directly on the target system. This is useful if the patch or upgrade makes extensive changes that are of the type(s) not supported by SharePlex replication, or if you are unsure of what it does.
With this procedure, you can keep the configuration file active on the source system. You use the reconcile command to identify and eliminate the following:
- Duplicate DML and supported DDL from the patch or upgrade operations that were replicated but also applied by the backup.
- Production transactions that were replicated but also applied by the backup.
Apply the patch/upgrade
To apply the patch or upgrade:
- Stop user access to the instances involved in replication on the source and target systems, but do not shut down SharePlex.
- On the source system, run sp_ctrl.
-
On the source system, flush the data to the target system. This command stops Post and places a marker in the data stream that establishes a synchronization point between source and target data.
sp_ctrl> flush datasource
where: datasource is the datasource of the source instance, for example o.oraA.
- On the source system, apply the patch or upgrade.
- On the source system, restore user access to the source instance.
-
[If the patch/upgrade adds objects that must be replicated] Edit the configuration file as follows (do not deactivate it). The patch or upgrade may have affected column partitions or column conditions in partitioned replication. For more information, see Change an Active Configuration File.
-
Copy the configuration file.
sp_ctrl> copy config filename to newname
-
Edit the copy.
sp_ctrl> edit config newname
Save the file.
-
-
Do one of the following:
-
If you added objects in the previous step, activate the new configuration file.
sp_ctrl> activate config newname
-
If you did not make any changes to the original configuration file, activate that one.
sp_ctrl> activate config filename
-
- On the source, run the Oracle hot backup.
-
On the source, switch log files and make a note of the highest archive-log sequence number.
On-premises database:
svrmgr1> alter system switch logfile;
Amazon RDS database:
Use Amazon RDS procedure rdsadmin.rdsadmin_util.switch_logfile.
- On the target, recover the target database from the hot backup using the UNTIL CANCEL option in the RECOVER clause, and cancel the recovery after Oracle fully applies the log that you recorded in the previous step.
- On the target system, open the database with the RESETLOGS option.
- Run the Database Setup utility on the target instance, but do not create a new user. Choose the existing SharePlex user and password (copied in the backup). For more information, see Database Setup Utilities in the SharePlex Reference Guide.
-
On the target system, issue the reconcile command using the sequence number of the log that you noted previously. If you are using named post queues, issue the command for each one. If you do not know the queue names, issue the qstatus command first.
sp_ctrl> qstatus
sp_ctrl> reconcile queue queuename for datasource-datadest seq sequence_number
Example: reconcile queue SysA for o.oraA-o.oraA seq 1234
Note: The reconcile process retains control of sp_ctrl until it is finished.
- On the target system, if the patch or upgrade installed triggers on the tables in replication, disable them or run the sp_add_trigger.sql utility script so that the triggers ignore the SharePlex user.
- On the target system, if the patch or upgrade added check constraints or scheduled jobs that perform DML, disable them.
-
On the target system, perform any cleanup required by partitioned replication.
-
On the target system, start Post.
sp_ctrl> start post
The two instances are now in synchronization, and SharePlex resumes replication.