Informix Error -582: Database does not have logging.
Cause and resolution
Database does not have logging.
This ROLLFORWARD statement could not be executed because this database does not have a transaction log. The rollforward operation uses the transaction log as its input. Since no transactions have been logged, the database cannot be rolled forward.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-582 fires when ROLLFORWARD DATABASE is attempted against a database that was never created
with transaction logging — per the official guidance, rollforward uses the transaction log as its
input, and with no logging, there's nothing to roll forward from.
ROLLFORWARD DATABASEattempted on an unlogged database, per the official guidance — the direct, only cause.- A recovery procedure applied uniformly across a mix of logged and unlogged databases, without checking each one's logging status first.
- A database's logging status misremembered or assumed — expecting logging to be on when the database was actually created without it (or had logging turned off since).
Solutions / Resolution
- Confirm the database's logging status before attempting a rollforward, per the official
guidance's underlying requirement:
SELECT name, is_logging FROM sysmaster:sysdatabases WHERE name = 'target_db'; - Recognize that rollforward simply isn't applicable to an unlogged database, per the official guidance — there is no fix that makes it work retroactively, since the transactions that would be rolled forward were never logged in the first place.
- If ongoing rollforward capability is needed going forward, recreate the database with logging enabled, and treat any data since the last backup of the unlogged database as unrecoverable via rollforward.
Examples
Hitting the restriction
$ cd /path/containing/target_db.dbs
$ dbaccess - <<'EOF'
ROLLFORWARD DATABASE target_db;
EOF
-- -582: target_db was never created with logging
Checking logging status first
SELECT name, is_logging FROM sysmaster:sysdatabases WHERE name = 'target_db';
Diagnostic Checks
- Query
sysmaster:sysdatabasesforis_loggingon the target database before attemptingROLLFORWARD DATABASE.
Related Errors / Related Topics
- -547 — "Must rollforward database in the directory where the database is." A related
ROLLFORWARDerror, about the working-directory requirement rather than the database lacking logging altogether.
Rollforward has nothing to work from on an unlogged database — check is_logging in
sysmaster:sysdatabases before attempting it.