Informix Error -569: Cannot reference an external database with logging.
Cause and resolution
Cannot reference an external database with logging.
This statement refers to a database other than the current database. However, the current database does not use transaction logging, and the external one does. This action is not supported; the databases that are used in a single transaction must all use logging or all not use it.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-569 is the mirror image of -568: it fires when a statement in the current (unlogged) database references an external database that does use transaction logging — per the official guidance, all databases participating in a single transaction must either all use logging or all not use it.
- A cross-database reference from an unlogged database to a logged one, per the official guidance — the direct, only cause.
- An unlogged staging/scratch database (created without logging for load performance) referencing a logged application database within the same transaction.
- A database's logging mode changed after cross-database SQL was already written against it, turning previously valid cross-database statements into ones that now violate this rule.
Solutions / Resolution
- Make the databases' logging modes consistent, per the official guidance's underlying requirement — either add logging to the current (unlogged) database, or restructure the operation to avoid a same-transaction cross-database reference.
- Move data between the databases via unload/load instead of an in-transaction cross-database reference, if the unlogged database's lack of logging is intentional.
- Check a database's logging mode before writing cross-database SQL against it:
SELECT name, is_logging FROM sysmaster:sysdatabases WHERE name = 'target_db';
Examples
The disallowed cross-database reference
DATABASE unlogged_scratch_db; -- no logging
SELECT * FROM logged_app_db:orders;
-- -569: logged_app_db uses logging
Checking logging modes first
SELECT name, is_logging FROM sysmaster:sysdatabases
WHERE name IN ('unlogged_scratch_db', 'logged_app_db');
Diagnostic Checks
- Query
sysmaster:sysdatabasesfor theis_loggingstatus of both the current and the referenced external database, to confirm the mismatch before deciding how to resolve it.
Related Errors / Related Topics
- -568 — "Cannot reference an external database without logging." The mirror-image restriction: a logged current database referencing an unlogged external one.
- -570 — "Cannot reference an external ANSI database." The same family of cross-database mode consistency restrictions, for ANSI compliance rather than logging.
The mirror image of -568 — same underlying rule (all databases in a transaction must share a logging mode), triggered from the opposite direction.