Replaying a database operation from a single journal entry

 

Use the Replay Database Operation (QDBRPLAY) API to replay a database operation from a single journal entry. You can only use the QDBRPLAY API to replay journal entries for database file objects. Also, the API does not run under commitment control even if the original journal entry was performed as part of a committable transaction.

Since these database journal entries can be very large, be sure to retrieve the journal entries using an interface that supports pointers (either the Retrieve Journal Entries (QjoRetrieveJournalEntries) API or the Receiver Journal Entry (RCVJRNE) command).

You can use the QDBRPLAY API to replay the following journal entries. You can get more information about these journal entries in the Journal entry information finder.

Journal code Entry type Description
D AC Add Constraint
D CG Change File
D CT Create File
D DC Remove Constraint
D DT Delete File
D FM Move File
D FN Rename File
D GC Change Constraint
D GO Change Owner
D GT Grant File
D RV Revoke File
D TC Add Trigger
D TD Remove Trigger
D TG Change Trigger
D TQ Refresh Table
F CB Change Member
F DM Remove Member
F MC Add Member
F MN Rename Member
F RM Reorganize Member

 

Renaming exit program

The QDBRPLAY API has an exit program that can change the names of the objects that are referenced in the journal entry. If a rename exit program is specified, each name referenced during the replay of the operation will be passed to the rename exit program. The names passed to the rename exit program might be short names or long SQL names. The same name might be passed to the exit program more than once if it is referenced in the internal journal entry specific data more than once. If the names are changed by the rename exit program, the names are case sensitive and must conform to any i5/OS® and SQL rules for object names.

 

Parent topic:

Working with journal entry information

Related concepts
Retrieving journal entries in a program