Informix Error -1802: Connection name in use.
Cause and resolution
Connection name in use.
A connection with the same connection name has already been made. Each connection must have a unique connection name. Rename the connection, and try again.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1802 fires when a CONNECT TO ... AS clause reuses a connection name that's already in
use — per the official guidance, each connection must have a unique connection name.
- A
CONNECT TO ... ASclause naming a connection name already established, per the official guidance — the direct, only cause.
Solutions / Resolution
- Rename the connection, and try again, per the official guidance.
Examples
Reusing a connection name
CONNECT TO 'stores7@server_a' AS conn1;
CONNECT TO 'other_db@server_b' AS conn1;
-- -1802: conn1 is already in use
Corrected
CONNECT TO 'stores7@server_a' AS conn1;
CONNECT TO 'other_db@server_b' AS conn2;
Diagnostic Checks
- Check whether the connection name is already in use before issuing
CONNECT TO ... AS.
Related Errors / Related Topics
- -1803 — "Connection does not exist." The mirror-image restriction:
SET CONNECTION/DISCONNECTreferencing a name that isn't established, rather thanCONNECT TOreusing one that already is.
The connection name is already in use — rename it and try again.