Informix Error -1801
-1801 Multiple-server transaction not supported.
You are attempting to span multiple connections within a single transaction. You can switch to a different connection while a transaction is active if you use the WITH CONCURRENT TRANSACTION clause when you establish the connection.
This error message can occur when you try to switch connections as follows:
* If the current connection is to a Version 6.0 or later database server, you did not specify the WITH CONCURRENT TRANSACTION clause when you established the connection, and there is an active transaction in the current connection.
* If the current connection is to a Version 5.0 database server, you did not specify the WITH CONCURRENT TRANSACTION clause when you established the connection, and a database is currently open on this connection.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1801 fires when a transaction attempts to span multiple connections without the transaction
mode supporting it — per the official guidance, this happens either on a Version 6.0+ server
without the WITH CONCURRENT TRANSACTION clause when an active transaction exists, or on a
Version 5.0 server without that clause when a database is open on that connection.
- Switching connections mid-transaction without
WITH CONCURRENT TRANSACTION, per the official guidance's Version 6.0+ case. - Switching connections with a database already open, without
WITH CONCURRENT TRANSACTION, per the official guidance's Version 5.0 case.
Solutions / Resolution
- Use the
WITH CONCURRENT TRANSACTIONclause when establishing the connection, per the official guidance, if switching connections during an active transaction is genuinely needed.
Examples
Establishing a connection with concurrent-transaction support
CONNECT TO 'stores7@server_b' AS conn_b WITH CONCURRENT TRANSACTION;
Diagnostic Checks
- Check whether the connection was established with
WITH CONCURRENT TRANSACTION, if switching connections mid-transaction is intended.
Related Errors / Related Topics
- -1800 — "Invalid transaction state." A related transaction-state error, about disconnecting with an open transaction rather than spanning connections.
Spanning a transaction across connections requires WITH CONCURRENT TRANSACTION at connect
time.