Informix Error -26199: The RETAINUPDATELOCKS session environment cannot be set in a nonlogging database.
Cause and resolution
The RETAINUPDATELOCKS session environment cannot be set in a nonlogging database.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-26199 fires when RETAINUPDATELOCKS is set while connected to a non-logging
database — per the official guidance.
- The current database has no transaction logging, per the official
guidance — the direct, only cause;
RETAINUPDATELOCKSrequires a logging database.
Solutions / Resolution
- Set
RETAINUPDATELOCKSonly while connected to a logging database, per the official guidance.
Examples
Checking database logging status
SELECT is_logging FROM sysmaster:sysdatabases WHERE name = 'mydb';
Diagnostic Checks
- Check whether the current database has transaction logging enabled, and switch to
a logging database before setting
RETAINUPDATELOCKS.
Related Errors / Related Topics
- -26200 — "The RETAINUPDATELOCKS session environment cannot be set on secondary
server in a high-availability cluster." A related
RETAINUPDATELOCKSrestriction, on HDR secondary servers rather than non-logging databases.
RETAINUPDATELOCKS was set on a non-logging database — switch to a logging database
first.