Use this procedure to use an Oracle hot backup to establish a target Oracle instance and activate replication without quieting the source database. This procedure involves using the reconcile command to ensure that transactions which occurred after the point of backup are applied to the target, while eliminating redundant replicated transactions that were already captured by the backup.
Read these points before you proceed.
Oracle source and Oracle target
All replication strategies are supported with the following limitations:
Limitation applies to: | Description |
---|---|
Consolidated replication (many sources to one target) |
To establish consolidated replication, the use of a hot backup from all source systems is not possible. A backup from one source will override the data that was applied by a backup from a different source. You can use a hot backup of one of the source instances to establish a target instance, and then use another copy method to apply the objects from the other source instances. Possible methods include:
|
Peer-to-peer |
To establish peer-to-peer replication, you must:
Only after this procedure has been performed on all of the secondary systems may users may resume activity on them. |
Windows systems | To use a hot backup between Windows systems, the target system must have an instance already created containing an identical ORACLE_SID and directory structure created with the Oracle creation tools. Oracle runs as a service on Windows, and the Registry entries must exist before starting the database recovery process. The database can start empty, because the hot backup will populate it. |
There are two procedures for activation with a hot backup, depending on your replication strategy.
Activation with hot backup: all strategies except cascading
Activation with hot backup: cascading replication
Use this procedure for all replication strategies except cascading replication where SharePlex will be posting to a database on the intermediary system.
On both 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 database has been recovered and reconciled.
sp_ctrl> stop post
When the backup is finished, activate the configuration on the source system.
sp_ctrl> activate config filename
On the source system, monitor activation status.
sp_ctrl> show activate
Note: The command retains control of sp_ctrl until activation is finished.
When activation is complete, switch log files on the source system.
svrmgr1> alter system switch logfile;
Do one of the following:
To recover the database to a sequence number, make a note of the highest archive-log sequence number.
On the target system, do one of the following:
On the target system, run Database Setup
Would you like to create a new SharePlex user [y]. n
Note: SharePlex can remain running during the setup process.
[Optional] If you are using named post queues and are unsure of the queue names, issue the qstatus command.
sp_ctrl> qstatus
On the target system, issue the reconcile command as follows, depending on the recovery option you chose. If you are using named post queues, issue the command for each one.
If recovering to a sequence number, substitute the 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.oraA-o.oraA seq 1234
If recovering to a SCN, substitute the SCN that you noted previously.
sp_ctrl> reconcile queue queuename for datasource-datadest scn scn_number
Example: reconcile queue SysA for o.oraA-o.oraA scn 0123456789
Note: The command retains control of sp_ctrl until the reconcile process is finished.
[High availability only] On the target (secondary) system, stop Export.
sp_ctrl> stop export
[High availability and peer-to-peer only] On the target (secondary) system, activate the configuration so that SharePlex is ready in the event of failover.
sp_ctrl> activate config filename
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
Use this procedure for cascading replication where SharePlex will be posting to a database on the intermediary system.
You will apply the backup to the intermediary system first (represented as “sysB”), and then to the target system (represented as “sysC”).
sp_ctrl> status
sp_ctrl> stop post
When the backup is finished, activate the configuration on the source system.
sp_ctrl> activate config filename
On the source system, view activation status.
sp_ctrl> show activate
Note: The command retains control of sp_ctrl until activation is finished.
When activation is complete, switch log files on the source system.
svrmgr1> alter system switch logfile;
On the intermediary system, run Database Setup
Would you like to create a new SharePlex user [y]. n
Note: SharePlex can remain running during the setup process.
[Optional] If you are using named post queues and are unsure of the queue names, issue the qstatus command.
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
On the intermediary system, run the cleanup.sql script to truncate all of the SharePlex internal tables. Instructions for running this script are in the SharePlex Reference Guide.
On the intermediary system, set the SP_OCT_REPLICATE_POSTER parameter to 1. This directs SharePlex to capture posted changes on that system and replicate them to the target system.
sp_ctrl> set param SP_OCT_REPLICATE_POSTER 1
[Partitioned replication only] If you are using vertically partitioned or horizontally partitioned replication for any tables, delete the unneeded columns and rows from those tables.
Important! Do not start any Post processes yet.
On the target system, recover the database from the hot backup using the UNTIL CANCEL option in the RECOVER clause, and cancel the recovery after Oracle has fully applied the log that you reconciled to in the previous steps taken on the intermediary system.
On the target system, run Database Setup
Would you like to create a new SharePlex user [y]. n
Note: SharePlex can remain running during the setup process.
On the target system, run the cleanup.sql script to truncate the SharePlex internal tables. Instructions for running this script are in the SharePlex Reference Guide.
[Partitioned replication only] If you are using vertically partitioned or horizontally partitioned replication for any tables, delete the unneeded columns and rows from those tables.
On the intermediary system, activate the configuration file.
sp_ctrl> activate config filename
On the intermediary system, monitor activation status.
sp_ctrl> show activate
Note: The command retains control of sp_ctrl until activation is finished.
On the intermediary and target systems, start the Post process. All instances are now in synchronization, and SharePlex will continue replicating to maintain synchronization.
sp_ctrl> start post
[Optional] If this was only a partial backup, drop the tablespaces that were not copied over during the hot backup.
Use this procedure to use an Oracle hot backup to establish a target Oracle instance and activate replication if user activity can be stopped while the procedure is performed. This procedure can be used for all replication configurations.
Read these points before you proceed.
Oracle source and Oracle target
All but high-availability. This procedure is not appropriate for a high-availability strategy because it requires the source database to be quieted while the backup is taken and the configuration file is being activated.
Certain limitations apply:
Limitation applies to: | Description |
---|---|
Consolidated replication (many sources to one target) |
To establish consolidated replication, the use of a hot backup from all source systems is not possible. A backup from one source will override the data that was applied by a backup from a different source. You can use a hot backup of one of the source instances to establish a target instance, and then use another copy method to apply the objects from the other source instances. Possible methods include:
|
Windows systems | To use a hot backup between Windows systems, the target system must have an instance already created containing an identical ORACLE_SID and directory structure created with the Oracle creation tools. Oracle runs as a service on Windows, and the Registry entries must exist before starting the database recovery process. The database can start empty, because the hot backup will populate it. |
Note: If you are not using cascading replication, ignore all references to an intermediary system. For more information about cascading replication, see Configure replication through an intermediary system.
On the source system, switch the redo logs
svrmgr1> alter system switch logfile;
On all systems, verify that sp_cop and sp_ctrl are running.
sp_ctrl> status
On the intermediary and target systems, stop Post. Stopping Post allows replicated data to accumulate in the post queue until the databases have been recovered.
sp_ctrl> stop post
On the source system, activate the configuration file.
sp_ctrl> activate config filename
On the source system, view activation status.
sp_ctrl> show activate
Note: The command retains control of sp_ctrl until activation is finished.
On the intermediary and target systems, run Database Setup
Would you like to create a new SharePlex user [y].n
Note:SharePlex can remain running during the setup.
[Intermediary system only] On the intermediary system, set the SP_OCT_REPLICATE_POSTER parameter to 1. This directs SharePlex to capture posted changes on that system and replicate them to the target system.
sp_ctrl> set param SP_OCT_REPLICATE_POSTER 1
On the intermediary system, activate the configuration file.
sp_ctrl> activate config filename
On the intermediary system, monitor activation status.
sp_ctrl> show activate
Note: The command retains control of sp_ctrl until activation is finished.
When activation is finished, start the Post process on the intermediary and target systems. All instances are now in synchronization, and SharePlex will continue replicating to maintain synchronization.
sp_ctrl> start post
[Optional] If this was only a partial backup, drop the tablespaces that were not copied over during the hot backup.
Use this procedure to use the Oracle transportable tablespaces feature to establish a target Oracle instance and activate replication. It enables you to synchronize and resynchronize numerous objects quickly and with minimal downtime. It allows you to export just the metadata (data dictionary) and then copy the data files. This method also moves indexes so that there is no need to rebuild them in the target database, and you can move multiple tablespaces at one time.
Note: This document does not provide instructions for how to use transportable tablespaces. This procedure should be performed by someone who has a solid understanding of database copy methods.
Read these points before you proceed.
Oracle source and Oracle target
All replication strategies. This procedure may not appropriate for a high-availability strategy if the source database cannot be quieted even briefly.
In this procedure, the "source" system is one of the following:
In this procedure, the "intermediary" system only needs to be part of this procedure if SharePlex will be posting to, and capturing from, an intermediary system in a cascading configuration.
In this procedure, the "target" system is one of the following:
In this procedure, the SharePlex commands in the procedure apply to all sp_cop instances that apply to the replication strategy you are using (for example, all sp_cop processes on a target in consolidated replication).
On the source system, set the source tablespaces that you want to copy to READ ONLY.
svrmgr1> alter tablespace name read only;
On the source system, activate the configuration file.
sp_ctrl> activate config filename
On the source system, verify that sp_cop and sp_ctrl are running.
sp_ctrl> status
On the intermediary and target systems, stop Post. Stopping Post allows replicated data to accumulate in the post queue until the databases have been recovered.
sp_ctrl> stop post
Set the source tablespaces back to read/write mode.
svrmgr1> alter Tablespace name read write;
On the intermediary and target systems, disable triggers on the tables, or run the sp_add_trigger.sql utility script so that the triggers ignore the SharePlex user.
[Intermediary system only] Set the SP_OCT_REPLICATE_POSTER parameter to 1. This directs SharePlex to capture posted changes on that system and replicate them to the target system.
sp_ctrl> set param SP_OCT_REPLICATE_POSTER 1
[Intermediary system only] Activate the configuration file.
sp_ctrl> activate config filename
[High availability] On the target system, stop the Export process.
sp_ctrl> stop export
[High availability and peer-to-peer replication] Activate the configuration on the target system(s).
sp_ctrl> activate config filename
Start Post on the intermediary and target systems. SharePlex begins executing the SQL statements that have been collecting in the post queue, keeping the source and target data in sync.
sp_ctrl> start post
Use this procedure to synchronize the source and target data with the following utilities:
Note: This document does not provide instructions for how to perform the chosen copy method. This procedure should be performed by someone who has a solid understanding of database copy methods.
Read these points before you proceed.
Oracle source and Oracle target
All but high-availability. This procedure is not appropriate for a high-availability strategy because it requires the source database to be quieted while the configuration file is being activated.
In this procedure, the "source" system is one of the following:
In this procedure, the "intermediary" system only needs to be part of this procedure if SharePlex will be posting to, and capturing from, an intermediary system in a cascading configuration.
In this procedure, the "target" system is one of the following:
In this procedure, the SharePlex commands in the procedure apply to all sp_cop instances that apply to the replication strategy you are using (for example, all sp_cop processes on a target in consolidated replication).
On the source system, stop user access to the objects that are in the replication configuration.
On the source system, activate the configuration file (all files if using consolidated replication).
sp_ctrl> activate config filename
On the intermediary and target systems, stop Post. Stopping Post allows any data that gets replicated before the target data is established to collect in the post queue.
sp_ctrl> stop post
On the source system, verify that the sp_cop, Capture, and Read processes are running.
sp_ctrl> status
On the intermediary and target systems, disable triggers on the tables, or run the sp_add_trigger.sql utility script so that the triggers ignore the SharePlex user.
[Intermediary system only] Set the SP_OCT_REPLICATE_POSTER parameter to 1. This directs SharePlex to capture posted changes on that system and replicate them to the target system.
sp_ctrl> set param SP_OCT_REPLICATE_POSTER 1
[Intermediary system only] Activate the configuration file.
sp_ctrl> activate config filename
Start Post on:
Note: SharePlex will start executing SQL statements that accumulated in the post queue.
© 2021 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy