Informix Error -196
-196 ISAM error: Operation not allowed in temporary dbspace.
An operation was executed on a temporary dbspace that required functionality that temporary dbspaces do not provide (most likely logging). Use a nontemporary dbspace for this operation.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-196 is a storage-space type mismatch: an operation requiring functionality temporary dbspaces don't provide — most likely transaction logging — was attempted against one. Temporary dbspaces are designed for transient sort/temp-table space, not durable, recoverable storage, so they don't support the same feature set as a nontemporary dbspace.
- An operation requiring transaction logging attempted against a table in a temporary dbspace — the direct cause, and the specific functionality the official text names as most likely missing.
- A permanent table meant for real data accidentally created in a temporary dbspace instead of a nontemporary one — a naming/configuration mix-up similar in spirit to -170's dbspace/blobspace confusion, here between temporary and nontemporary dbspaces.
- Application code or scripts dynamically selecting a dbspace for a new table without validating whether it's temporary or permanent, landing on a temp dbspace by mistake.
- A
DBSPACETEMPmisconfiguration causing an operation intended for a real dbspace to resolve to a temporary one instead.
Solutions / Resolution
- Use a nontemporary dbspace for the operation, per the official guidance — identify the correct permanent dbspace and redirect the operation there.
- Review dbspace selection logic in application code or scripts to ensure permanent objects are created in nontemporary dbspaces specifically, not wherever a generic selection routine happens to land.
- Adopt naming conventions that clearly distinguish temporary from nontemporary dbspaces — the same discipline -170 recommends for blobspaces vs. dbspaces — to reduce this class of mistake.
- Review
DBSPACETEMPconfiguration if an unintended resolution to a temporary dbspace is suspected.
Examples
The mistaken target
CREATE TABLE customer (id INT, name VARCHAR(50)) IN tempdbs1;
-- -196: tempdbs1 is a temporary dbspace — this table needs logging
-- support that temporary dbspaces don't provide
Fix:
CREATE TABLE customer (id INT, name VARCHAR(50)) IN dbspace1;
-- dbspace1 is a nontemporary dbspace — this succeeds
Naming conventions that prevent the mistake
-- Clear naming distinguishes the two types at a glance:
dbspace_primary, dbspace_archive -- nontemporary
tempdbs1, tempdbs2 -- temporary
Diagnostic Checks
- Confirm the type of the dbspace involved (temporary vs. nontemporary):
onstat -d - Review the specific operation attempted — most operations that hit this need logging support — and confirm it's targeting the wrong space type.
Related Errors / Related Topics
- -170 — "ISAM error: illegal use of a storage space for TEXT or BYTE data." The direct structural sibling — same general category of storage-space type mismatch, applied to blobspaces vs. dbspaces rather than temporary vs. nontemporary.
- -122 — "ISAM error: transaction not available." Related through the same underlying concern — transaction logging support — that temporary dbspaces specifically don't provide.
Confirm the dbspace's actual type before attempting an operation that needs logging support — a quick, direct check that resolves the confusion immediately.