In order to "unlock" the AI extent, under normal production transaction processing workload and low replication latency conditions, the AI buffer containing the AI switch note will and the associated last AI pointers in RPLS-Q will be processed against the target database, unlocking the AI extent for re-use.
Otherwise a
dummy update on the source database will result in the same action, if it is only the last notes in the switched AI file that need processing.
For example: Determine which table/record would be suitable for your specific database:
FIND FIRST <DummyTable> EXCLUSIVE-LOCK NO-ERROR .
IF AVAILABLE <DummyTable> THEN
<DummyTable.Desc> = STRING(NOW).
- The dummy update code could either be run immediately after a manual AI extent switch, at a specified time via a scheduler such as CRON, or prior to custom scripts that do checking for LOCKED extents. The technique used may depend on whether custom scripts that manage after imaging or the database is enabled for the AI Archiver feature.
- Run the code after scheduled backups (probkup) or PROQUIET enable, as these utilities will automatically force an ai extent switch.
- The AI extent may remain LOCKED immediately after running the dummy program which assures a transaction end and that it may take a few seconds for the AI block to be flushed and the status to become FULL or EMPTY when AIMGT is used.
The resolution in this Article refers to the singular AI extent which is switched from when online PROBKUP is run (a LOCKED extent) or the AI extent that is switched with RFUTIL -C AIMAGE NEW or during online processing.
While there may be only one LOCKED extent at the time, due to frequency of switching it is additionally plausible that replication latency is playing it's part in LOCKED extents, where this dummy code will not unlock the extent as there are still remaining transaction notes in it to still be processed. Monitoring how far the replication target is behind the replication source with the DSRUTIL utility will provide additional metrics to support the reason ai files are remaining in LOCKED status. Refer to Article: