INSERTALLRECORDS
Valid For
Replicat
This parameter does not work with UPDATERECORDFORMAT COMPACT
.
Description
Use the INSERTALLRECORDS
parameter to keep a record of all operations made to a target record, instead of maintaining just the current version. INSERTALLRECORDS
causes Replicat to insert every change that is made to a record as a new record in the database. The initial insert and subsequent updates and deletes are maintained as point-in-time snapshots.
Some cases for using INSERTALLRECORDS
are the following:
-
To work within an exceptions
MAP
statement. In an exceptionsMAP
statement,INSERTALLRECORDS
causes the values of operations that generated errors to be inserted as new records in an exceptions table as part of an error-handling strategy. -
To maintain a transaction history. By inserting every change to a specific row as a new record in the database, you can maintain a history of all changes made to that row, instead of maintaining just the current version. Each insert is a point-in-time snapshot that can be queried as needed for auditing purposes. Combining historical data with special transaction information provides a way to create a more useful target reporting database.
INSERTALLRECORDS
can be used at the root level of the parameter file to affect all subsequent MAP
statements, and it can be used within a MAP
statement to affect a specific table or multiple tables specified with a wildcard.
Getting More Information about INSERTALLRECORDS
See Administering Oracle GoldenGate for information about creating a transaction history table.
See Administering Oracle GoldenGate for information about using an exceptions MAP
statement.
See "TABLE | MAP" for MAP
syntax.
Default
None
Syntax
INSERTALLRECORDS
Examples
- Example 1
-
This example shows
INSERTALLRECORDS
at the root level of the parameter file as part of an exceptions handling configuration.REPLICAT deliv USERIDALIAS tiger1 ASSUMETARGETDEFS REPERROR (DEFAULT, EXCEPTION) MAP ggs.equip_account, TARGET ggs.equip_account2, COLMAP (USEDEFAULTS); MAP ggs.equip_account, TARGET ggs.equip_account_exception, EXCEPTIONSONLY, INSERTALLRECORDS COLMAP (USEDEFAULTS, DML_DATE = @DATENOW(), OPTYPE = @GETENV('LASTERR', 'OPTYPE'), DBERRNUM = @GETENV('LASTERR', 'DBERRNUM'), DBERRMSG = @GETENV('LASTERR', 'DBERRMSG'));
- Example 2
-
This example shows
INSERTALLRECORDS
in aMAP
statement.REPLICAT deliv USERIDALIAS tiger1 SOURCEDEFS /ggs/dirdef/defs REPERROR DEFAULT, ABEND MAP fin.accTAB, TARGET fin.custTAB, INSERTALLRECORDS;