Informix Error -875: Incompatible Access Mode and Isolation Level.
Cause and resolution
Incompatible Access Mode and Isolation Level.
If you set the access mode to READ-WRITE, you cannot set the isolation level to READ-UNCOMMITTED.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-875 fires when SET TRANSACTION combines READ WRITE access mode with READ UNCOMMITTED
isolation level — per the official guidance, that specific combination isn't allowed.
SET TRANSACTION READ WRITEcombined withISOLATION LEVEL READ UNCOMMITTED, per the official guidance — the direct, only cause; READ UNCOMMITTED (dirty read) semantics aren't compatible with a transaction that intends to write.
Solutions / Resolution
- Use a different isolation level with
READ WRITE, per the official guidance's implied fix —READ COMMITTED,REPEATABLE READ, orSERIALIZABLEare all compatible withREAD WRITE. - Or use
READ ONLYaccess mode ifREAD UNCOMMITTEDisolation is genuinely needed, since that combination is permitted.
Examples
The disallowed combination
SET TRANSACTION READ WRITE, ISOLATION LEVEL READ UNCOMMITTED;
-- -875: READ WRITE can't combine with READ UNCOMMITTED
Corrected — a compatible isolation level
SET TRANSACTION READ WRITE, ISOLATION LEVEL READ COMMITTED;
Or corrected — READ ONLY with READ UNCOMMITTED
SET TRANSACTION READ ONLY, ISOLATION LEVEL READ UNCOMMITTED;
Diagnostic Checks
- Check the combination of access mode and isolation level in the
SET TRANSACTIONstatement —READ WRITEspecifically can't pair withREAD UNCOMMITTED.
Related Errors / Related Topics
- -877 — "Isolation Level previously set by 'Set Transaction'." A related
SET TRANSACTIONerror, about conflicting subsequent isolation-level statements. - -878 — "Invalid operation for a READ-ONLY transaction." A related
SET TRANSACTIONerror, about attempting to write within aREAD ONLYtransaction.
READ WRITE and READ UNCOMMITTED can't combine — use READ ONLY if uncommitted-read
semantics are genuinely needed.