Data definitions are needed when the source and target tables have
different definitions or the databases are of different types.
Perform below steps on the SOURCE database from which you want to
obtain metadata definitions.
From the Oracle GoldenGate directory, run GGSCI.
1. In
GGSCI, issue the following command to create a DEFGEN parameter file.
ggsci > Edit
params defgen
defsfile
./dirsql/SOURCE_DEFGEN.def
userid
gguser password ******
TABLE schema.*;
2. Enter the parameters listed above in the order
shown and invoke DEFGEN from GG_HOME location
$ ./defgen
paramfile ./dirprm/defgen.prm
3.
Use FTP or SFTP to transfer this SOURCE_DEFGEN.def file to the TARGET server
4. Specify this copied SOURCE_DEFGEN.def file location in REPLICAT param file
ex: SOURCEDEFS ./dirsql/SOURCE_DEFGEN.def
For every DDL change happen to the source tables (only tables which are captured for replication) generate a NEW sourcedef file and copied to the target server
NOTE: Do not create a data-definitions file for
Oracle sequences. It is not needed and DEFGEN does not support it.