Home > GG > DEFGEN:


June 16, 2013


1.The defgen utility produces a file containing a definition of the layouts of the source files and tables.

2. This source definition file is used to interpret layouts for data stored in Oracle GoldenGate trails.

3. At startup, Replicat reads the definition file specified with the SourceDefs parameter.



./defgen paramfile dirprm/defgen.prm reportfile dirrpt/defgen.rpt

Steps to create defgen file.

1)      Create parameters file.

GGSCI (xyz.us.abcd.com) 13> edit params defgen

defsfile ./dirsql/mytesttbl.sql

userid gguser password gguser

table hr.mytesttbl;

GGSCI (xyz.us.abcd.com) 13>

2)      Run the defgen utility at source.


./defgen  paramfile  dirprm/defgen.prm  reportfile  dirrpt/defgen.rpt

3)      Perform the changes as per the requirement.

a)      Changes in the extract parameter file.

           No changes required. We can use as it is.

b)      Changes in the pump parameter file.

           No changes required. We can use as it is.

c)      Changes in the replicate parameter file.

           We need to add following parameters.

USERID gguser, PASSWORD gguser
SOURCEDEFS ./dirsql/mytesttbl.sql
MAP gguser.mytesttbl, TARGET gguser.mytesttbl,
colmap (owner=owner, object_name=object_name,object_type=object_type);

Categories: GG
%d bloggers like this: