Informix Error -976
Cause and resolution
Table must be fragmented by expression to grant fragment authority.
The user attempted to grant fragment-level privileges on an unfragmented table or on a table that is not fragmented by expression.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-976 fires when a GRANT FRAGMENT statement targets a table that isn't fragmented, or one that's
fragmented by a scheme other than expression (round robin, for instance) — per the official
guidance, fragment-level privileges only make sense on a table fragmented by expression, since
that's the only fragmentation scheme where a fragment corresponds to a well-defined, describable
subset of rows.
- The target table not being fragmented at all, per the official guidance — fragment-level privileges have nothing to attach to.
- The target table being fragmented, but not by expression (round robin or a hash scheme, for example), per the official guidance — fragment authority specifically requires expression fragmentation.
Solutions / Resolution
- Confirm the table's actual fragmentation scheme before attempting to grant fragment-level privileges on it.
- If fragment-level privileges are genuinely needed, re-fragment the table by expression, provided that's compatible with the application's access patterns and storage requirements.
- If fragmentation can't be changed, grant table-level privileges instead — fragment-level authority is a refinement of table-level privilege, not a replacement for it.
Examples
Checking a table's fragmentation scheme
SELECT strategy, colname
FROM sysfragments f, syscolumns c
WHERE f.tabid = (SELECT tabid FROM systables WHERE tabname = 'mytable')
AND f.tabid = c.tabid;
A strategy of E indicates expression-based fragmentation; other values (R for round robin,
and so on) mean GRANT FRAGMENT isn't applicable until the table is re-fragmented.
Diagnostic Checks
- Query
sysfragmentsfor the target table's fragmentationstrategybefore attempting the grant. - If the table isn't fragmented by expression, decide between re-fragmenting it or falling back to table-level privileges.
Related Errors / Related Topics
- -977 — "No permission on fragment (dbspace-name/partition-name)." The runtime-side counterpart: this is what a user without fragment-level privilege sees when they try to modify data in a fragment, once fragment authority has actually been granted on an expression-fragmented table.
Fragment-level authority only applies to tables fragmented by expression — check the fragmentation scheme first if this grant unexpectedly fails.