Data definitions file (dirdef) use in Golden Gate
The GoldenGate Replicat uses the data definitions file to map the source and target tables.
Because you’re doing the mapping on the target server using the Replicat,
you generate the data definitions file on the source server and transfer it to the target server.
If you’re doing mapping on the source using the Extract, you create a data definitions file on the target server and transfer it to the source server.
GoldenGate doesn’t consider tables identical if any of the columns don’t match or are in a different order.
The names, lengths, data types, semantics, and column order must match exactly for GoldenGate to consider the tables identical.
1. Generating a data definitions file to create a defgen parameter file to tell GoldenGate what needs to be included in the file.
The following example creates a defgen parameter file for all the source tables in the HR schema. In this case the defgen file has the same name as the Replicat, but with a different file name extension, defs:
USERID GGER@sourcedb, PASSWORD userpw
This generates the data definitions file RHREMD1.defs as specified in the defgen parameter file.
2. The next step is to transfer this file from the source server to the target server. You should put the defgen file in the dirdef directory.
3. The last step is to tell GoldenGate that you’re using a defgen file and no longer using the ASSUMETARGETDEFS parameter because the source and target tables are different.
In the following example the ASSUMETARGETDEFS parameter is commented out, and you include a new SOURCEDEFS parameter that points to the defgen file:
Now that you’ve set up the column mapping and generated a data definitions file, you’re almost ready to start the Replicat.