Informix Error -192
-192 ISAM error: Cannot drop first chunk.
The first chunk of a storage space is never a candidate to be dropped. Select a different chunk.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-192 is a structural rule, not a configurable restriction: the first chunk of a storage space holds that space's own header/control information and can never be dropped individually while the storage space itself still exists.
- Attempting to drop the first chunk of a storage space directly — not permitted, regardless of the space's current usage or content.
- A cleanup or decommissioning script iterating through all of a dbspace's chunks generically (dropping each one in turn), without special-casing the first — such a script needs to drop the dbspace itself instead of attempting to remove its chunks one by one.
- Confusion about which chunk is actually "the first" for a given dbspace — typically the one specified when the dbspace was originally created.
Solutions / Resolution
- Select a different chunk instead, per the official guidance, if the actual goal is removing additional chunks beyond the first.
- If the real goal is removing the entire storage space (not just shrinking it), drop the dbspace itself — see -148 for the precondition that it must be empty first — rather than attempting to remove its first chunk individually.
- For generic chunk-cleanup scripts, exclude the first chunk of any dbspace from individual drop attempts, since it can only go away when the entire dbspace is dropped.
- Confirm which chunk is actually the first for the dbspace in question before attempting removal.
Examples
The structural restriction
onspaces -d dbspace1 -p /dev/chunk1 -o 0
-- -192: chunk1 is the first chunk of dbspace1 — it can't be
-- dropped individually
Removing the whole space instead
-- If the actual goal is removing dbspace1 entirely:
onspaces -d dbspace1
-- (after confirming, per -148, that dbspace1 is empty)
A script needing a special case
-- A generic cleanup script drops every chunk of a decommissioned
-- dbspace in a loop
for chunk in dbspace_chunks:
drop_chunk(chunk)
-- fails on the first chunk every time
-- Fix: drop the dbspace itself once all data is migrated out,
-- rather than iterating chunk-by-chunk
drop_dbspace("dbspace1")
Diagnostic Checks
- Review the dbspace's chunk list and confirm which chunk is the first.
- Determine the actual intent — shrinking the dbspace by removing an additional chunk, versus removing the entire storage space — to select the correct operation.
Related Errors / Related Topics
- -191 — "ISAM error: No such chunk." The direct sibling in chunk-management error handling.
- -148 — "ISAM error: dbspace is not empty." Relevant when the actual goal is removing the entire storage space rather than an individual chunk — the precondition that must be satisfied first.
If the goal is removing an entire storage space, drop the dbspace itself rather than attempting to remove its chunks individually — the first chunk specifically can never be dropped on its own.