Informix Error -1808: Reconnect to server_name server to perform the database operation.
Cause and resolution
Reconnect to server_name server to perform the database operation.
If you connect to a database server using the CONNECT statement, you cannot implicitly reconnect to a server through one of the DATABASE statements (DATABASE, START DATABASE, and so on). You must switch to it with the SET CONNECTION statement.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1808 fires when a session, connected explicitly via CONNECT, then attempts an implicit
reconnect to a different server through a DATABASE statement — per the official guidance, this
is the same underlying restriction as -758, naming the specific server that needs an explicit
SET CONNECTION.
- A
DATABASEstatement implicitly targeting a different server than the current explicit connection, per the official guidance — the same direct cause as -758.
Solutions / Resolution
- Use
SET CONNECTIONto switch to the named server explicitly, per the official guidance — see -758 for the full detail on this required mechanism.
Examples
N/A
This is closely related to -758's condition — see -758's examples for the underlying explicit-
connection/SET CONNECTION mechanism.
Diagnostic Checks
- Check whether the session connected via explicit
CONNECT, and if so, replace any implicit cross-serverDATABASEstatement withSET CONNECTION, per -758's diagnostic approach.
Related Errors / Related Topics
- -758 — "Cannot implicitly reconnect to the new server server_name." A closely related error covering this same explicit-connection/implicit-server-switch restriction.
- -1811 — "Implicit connection not allowed after an explicit connection." The general (non-server-specific) form of this same restriction.
Implicit server switching isn't allowed after an explicit CONNECT — use SET CONNECTION (see
-758 for the full detail).