Informix Error -158: ISAM error: Operation disallowed on SMI pseudo table.
Cause and resolution
ISAM error: Operation disallowed on SMI pseudo table.
You have attempted an SQL operation that is not supported on System Monitoring Interface (SMI) pseudo tables. Try another operation.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-158 means an operation was attempted against a System Monitoring Interface (SMI) pseudo table —
one of the sysmaster database's virtual tables — that isn't supported there. These tables
aren't genuine physical structures; they're generated on the fly from live engine internals, so
they don't support the full range of operations an ordinary table does.
- A write operation (
INSERT/UPDATE/DELETE) attempted against an SMI pseudo-table — these are read-only views into live engine state, not real, writable data. - DDL attempted against an SMI table (
CREATE INDEX,ALTER TABLE, and similar) — not supported, since these aren't physical structures the engine manages that way. - A query construct unsupported specifically against SMI tables, even for a plain
SELECT— some SMI tables restrict certain joins, functions, or locking hints because of how they're generated from internal engine structures rather than read from disk normally. - Generic tooling or an ORM treating
sysmastertables as ordinary tables, assuming uniform capabilities across every table in a database without special-casing thesysmasterdatabase's virtual nature. - Monitoring or reporting tooling attempting an operation that works on ordinary tables but isn't supported here — trying to add an index for query performance, for example, on a table that isn't stored the way indexing assumes.
Solutions / Resolution
- Restrict operations against SMI pseudo-tables to supported read (
SELECT) operations — per the official guidance, try a different, supported operation instead of the one that failed. - Treat
sysmastertables as read-only telemetry sources for monitoring or reporting needs — never attempt writes or DDL against them. - Review generic tooling or ORM configuration to exclude or special-case the
sysmasterdatabase, since its tables don't behave like ordinary user tables and shouldn't be treated uniformly by tooling that assumes they do. - If a query against an SMI table needs functionality that isn't supported directly (an index for performance, for example), select the needed data into a real temporary table first, then perform the additional operation against that copy instead of the SMI table directly.
- Consult the documentation for the specific SMI table involved, since supported operations can vary somewhat from one SMI table to another.
Examples
Attempting to write to a monitoring table
INSERT INTO sysmaster:syssesprof VALUES (...);
-- -158: this is a read-only view into live session profiling data,
-- not a table you can write to
Working around an unsupported operation via a temp table
-- Instead of attempting an unsupported operation directly on the SMI table:
SELECT * INTO TEMP tmp_sessions FROM sysmaster:syssessions;
-- now perform whatever additional operation is needed against
-- tmp_sessions, a genuine, ordinary temporary table
Generic tooling stumbling on sysmaster
A schema-introspection tool that iterates over every table in every database and attempts a
uniform operation (adding a monitoring index, for example) hits -158 the moment it reaches
sysmaster's pseudo-tables — the fix is excluding sysmaster from that tool's generic handling,
not finding a way to make the operation work there.
Diagnostic Checks
- Confirm the target table is genuinely an SMI/
sysmasterpseudo-table rather than an ordinary table that happens to have a similar name. - Review exactly which operation was attempted — a write, DDL, or an unsupported
SELECTvariant — against the table. - Check documentation for the specific SMI table involved, since the exact set of supported operations isn't identical across every SMI table.
Related Errors / Related Topics
- -100 — "ISAM error: duplicate value for a record with unique key." The other foundational ISAM-level error in this family, though unrelated in cause — grouped here as background on how this error class is organized.
If a monitoring or reporting workflow needs to do more than read from an SMI table, copy the needed data into a real temporary table first rather than trying to make the unsupported operation work directly against the pseudo-table.