Configure GoldenGate REPLICAT Process
The Oracle Goldengate Replicat process also known as the apply process, is a mandatory process in the Goldengate setup. This data delivery process is the last component to be setup on the the target database. It reads the data from a file known an EXTTRAIL file which contains data changes made on the source. In addition to applying the data on the target, the Goldengate replicat also posts its exact location of the trail file while processing records. This is used for recovery from crashes, allowing it to start from the exact point where it left off, without any data loss.
Configure GoldenGate REPLICAT
REPLICAT Parameter File
Below is the example of the Replicat parameter file. This file in usually placed in the $GG_HOME/dirprm directory. The GG_HOME is the home directory where GoldenGate binaries are installed and dirprm was created in the pre-requisitesphase by issuing “CREATE SUBDIRS”.
Below is the example of the Replicat parameter file. This file in usually placed in the $GG_HOME/dirprm directory. The GG_HOME is the home directory where GoldenGate binaries are installed and dirprm was created in the pre-requisitesphase by issuing “CREATE SUBDIRS”.
EDIT PARAMS rep1
REPLICAT rep1
ASSUMETARGETDEFS
USERID gg_admin PASSWORD india123
DISCARDFILE ./dirrpt/rprt.dsc, PURGE
DDL INCLUDE ALL
MAP syed.*, TARGET syed.*
The parameters above used in the Replicat parameter file, have been explained below.
PARAMETER | DESCRIPTION |
---|---|
REPLICAT | Name of the Replicat Process |
ASSUMETARGETDEFS | Used to identify that the column structure of the SOURCE and TARGET tables in the MAP statement are identical |
USERID | Login details for the GoldenGate Database user |
DISCARDFILE | This file contains data records that caused an error while they are written to the TARGET databas |
DDL INCLUDE MAPPED | This parameter is used to ensure that the scope of the DDL transaction is of mapped scope only |
MAP & TARGET | Used to map SOURCE and TARGET schema. In this example the source schema name is APPSRC01 and the target schema is APPTAR01 |
Add REPLICAT
At the GGSCI prompt in the Golden gate home directory the following commands need to be run.
At the GGSCI prompt in the Golden gate home directory the following commands need to be run.
GGSCI> DBLOGIN USERID gg_adminPASSWORD india123
GGSCI> ADD CHECKPOINTTABLE OGG_USER.ggschkpt
GGSCI> ADD REPLICAT rep1, EXTTRAIL ./dirdat/ps, BEGIN NOW, CHECKPOINTTABLE OGG_USER.ggschkpt
The DBLOGIN is used to login into the database. The EXTTRAIL parameter is used to specify the location and prefix of the EXTTRAIL file from where the Replicat process will read the data changes. Here “./dirdat/” is the EXTTRAIL path and “tt” is the prefix of EXTTRAIL file.
Start REPLICAT
In “ggsci” type the below command to start the Replicat process.
ggsci> start rep1
Here “rep1” is the name of the Replicat process.
Status of REPLICAT
In “ggsci” type the below command to check the status of the Replicat process.
Status of REPLICAT
In “ggsci” type the below command to check the status of the Replicat process.
ggsci> info rep1
ggsci> view report rep1
This command shows the display the status for the Replicat process.
Stopping REPLICAT
In “ggsci” type the command below to stop the GoldenGate replicat process.
Delete REPLICAT
In “ggsci” type the command below to delete the GoldenGate replicat process.
Stopping REPLICAT
In “ggsci” type the command below to stop the GoldenGate replicat process.
ggsci> stop rep1
Delete REPLICAT
In “ggsci” type the command below to delete the GoldenGate replicat process.
ggsci> delete rep1
No comments:
Post a Comment