If source and target table structures are different, like source has then we need to use definition file in replicat file.


Here we will generate definition file of a table DBACLASS.EMPLOYEE from source database and use it in target db.


1. Create defgen parameter file

This will create the parameter file in $GG_HOME/dirprm
ls -ltr /u01/ggate/dirprm/defgen.prm

2. Now execute the param file( to generate the defgen file)

./defgen paramfile /u01/ggate/dirprm/defgen.prm

Now copy the file dbaclass_def.sql to target server(where replicat is running.

4.  Stop the replicat and Update the extract file with sourcedef parameter as below

SOURCEDEFS /ggatebss/app/ggate/product/

Now you can start your replicat.



NOTE – If you source and target database versions are different. i.e source db is of 12c and target db is of 11g, then use format command in the defgen file. i.e the file will look as below. format release < target db release version>