Goldengate initial load options - File to Replicat

Goldengate initial load options - File to Replicat

This method allows the Extract process to write to a file on the target system, which the Replicat applies using SQL INSERT statements. 


The Extract process generates a file in a universal format for the Replicat to load. This approach fundamentally resembles the standard GoldenGate data replication method used for change data capture (CDC). During the initial load, you can enable CDC. In a live environment, you should use the SQLPREDICATE key to specify the SCN# to maintain data integrity.

Please follow the below steps to enable goldengate initial load using File to Replicat method

On source:
  1. Add initial load extract process.
  2. Create a parameter file.
  3. Verify task(initial load) is added.
  4. Start extract
  5. Validate data extraction
On target:
  1. Create parameter file initial load replicat process
  2. Run replicat from os level
  3. Validate data extraction and verify replication count from source and target

Please gone though further down detail on how to setup initial load for file to replicat

On Source:

1.Add initial load extract process 


ADD EXTRACT E_F2RT_1, SOURCEISTABLE

		







SOURCEISTABLE - parameter is used to extract all column data specified within a TABLE statement, ensuring complete records are directly retrieved from the source tables. This data is then prepared for loading into another table or file.

2.Create a parameter file
After successfully adding the extract process, you need to prepare the parameter file for it. You can either create the parameter file from GGSCI by using the command "EDIT PARAM E_F2RT" or directly navigate to the dirprm directory and use the vim editor to create the e_f2rt.prm file.


EXTRACT E_F2RT_1
USERIDALIAS gg03_cdb
RMTHOST ggate4, MGRPORT 7821
RMTFILE ./dirdat/in, PURGE
TABLE PDB1.DEMO.MYTABLE;

3.Verify initial load is added











4.Start Extract



start E_F2RT_1










5.Validate data extraction
Once the extraction process has commenced, it takes some time to complete. After completion, you can validate the number of records extracted. To do this, navigate to the "dirrpt" directory from the GoldenGate home. There, you will find the report file named with the extract process name and the extension ".rpt". Alternatively, you can open the report file from GGSCI using the command "view report E_F2RT_1".Open this report file and scroll to the bottom to find the information, as shown below:














On Target:


1.Create parameter file initial load replicat process
The data has now been taken out of the original database. The replication process to the target comes next. Making the parameter file ready is one of the essential components.


--REPLICAT R_IF2R_1
SPECIALRUN
END RUNTIME
USERIDALIAS gg04_pdb
EXTFILE /ggate1/oracle/ogg21c/dirdat/file_2_rpt/fr
DISCARDFILE ./dirrpt/r_if2r_1.dsc, purge
ASSUMETARGETDEFS
MAP GG03PDB01.SARA.USR_TB, TARGET GG04PDB01.SARA.USR_TB;


SPECIALRUN The Replicat is informed that this is a "ONE-TIME" process via this parameter. This process is not the standard one; it is an initial load. The process concludes at the end of the runtime.Replicat always uses BEGIN and END to determine when to start and stop processing for a SPECIALRUN. If nothing is entered for BEGIN, the process will start with the first record. If nothing is entered for END, the process start time will be used to determine the limit of the records to process.
ASSUMETARGETDEFS Use of it,when the source and target files have the same record or columns structure (for example, in hot site replication). This parameter is useful when source and target data definitions match and a definitions file is not available for the source database. For Oracle Goldengate 12c onward, this parameter became depricated because, while capturing data change, it included metadat for the record. 


2.Run replicat from os level
Please ensure that you are in the GoldenGate home directory before running the command in the OS command line prompt. Additionally, make sure that the GoldenGate directory is added to the PATH variable.


3.Validate data extraction and verify replication count from source and target
Once the replicat process is completed, the next step is to validate the count in the report file located in the 'dirrpt' directory. The file name corresponds to the replicat process name with an '.rpt' file extension.

Comments

Popular posts from this blog

Reset RMAN configuration all set to default

Mail server configuration on RHEL using gmail