Informix Error -1811: Implicit connection not allowed after an explicit connection.
Cause and resolution
Implicit connection not allowed after an explicit connection.
Once you have used the CONNECT TO statement to establish an explicit connection to a database server, you cannot use one of the DATABASE statements to connect implicitly to another database server. After an explicit connection, you must use the CONNECT TO statement to connect to other database servers.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1811 fires when a DATABASE-family statement attempts an implicit connection after an
explicit CONNECT TO was already used — per the official guidance, this is the general
statement of the same restriction that -758/-1808 apply to a specifically named target server.
- A
DATABASEstatement used to implicitly connect afterCONNECT TOestablished an explicit connection, per the official guidance — the direct, only cause.
Solutions / Resolution
- Use
CONNECT TOstatements for all subsequent database connections, per the official guidance, once the first explicit connection has been established.
Examples
N/A
This is the general form of -758/-1808's restriction — see -758's examples for the underlying mechanism.
Diagnostic Checks
- Check whether the session originally connected via
CONNECT TO, and if so, replace any implicitDATABASEconnection with an explicitCONNECT TO, per -758's diagnostic approach.
Related Errors / Related Topics
- -758 — "Cannot implicitly reconnect to the new server server_name." A closely related, server-specific form of this same explicit-connection restriction.
- -1808 — "Reconnect to server_name server to perform the database operation." Another closely related, server-specific form of this same restriction.
The general form of -758/-1808's restriction — once connected via CONNECT TO, all further
connections must also be explicit.