Precise Instantiation for Oracle Using the RMAN Method
-
Install and set up Oracle GoldenGate by deploying the software on both the source and target systems. Before configuring anything, make sure all database prerequisites are met. This includes enabling minimal supplemental logging on the source database, and using
ADD TRANDATA
orADD SCHEMATRANDATA
to ensure key columns in the replicated tables are logged. -
Add and configure the Extract and DISTPATH processes on the source database.
-
Add and configure the Replicat process on the target database.
- Start the Extract process and make sure that Extract starts running before any long-running transactions begin because Extract only captures complete transactions.
-
Start the DISTPATH process.
-
Do not start the Replicat process. wait until the target database has been fully recovered.
-
Use RMAN to take a backup of the source database. This backup will be used later to create the target database. The backup files need to be securely transferred to the target system.
RMAN target / RMAN> BACKUP DATABASE PLUS ARCHIVELOG
-
Use RMAN to create a duplicate of the source database and rename it as the target database name. For example, if the target database name is DBSOUTH, then rename the duplicate of the source database as DBSOUTH. Make sure to note the SCN (System Change Number) value during this process, as it marks the exact point in time where both databases are in sync. The following example displays the creation of a duplicate of the
DBNORTH
database, which is named asDBSOUTH
(same as the target database).OS> RMAN target / RMAN> restore database preview summary >>> Recovery must be done beyond SCN 1420004711 to clear datafile fuzziness OS> target sys/tiger99_RR@dbnorth RMAN> connect auxiliary RMAN> duplicate target database to DBSOUTH nofilenamecheck until SCN 1420004711;
-
Start the Replicat process on the
DBSOUTH
database, making sure it starts exactly at the same SCN as the database that was recovered using RMAN.Use the
ATSCN
option to ensure there is no data gap during replication:OGG http://www.example.com:12000 depl_south> START REPLICAT REPS, ATCSN 1420004711
The following diagram illustrates these steps: