Informix Error -319
-319 Index does not exist.
This statement refers to an index that does not exist. Review the spelling of the index name; if it is as you intended, and you are sure it should exist, make sure you are using the right database.
In an ANSI-compliant database, an index that you do not own must be qualified with its owner's name. See the discussion of error -316 for a way to check the names and owners of all indexes.
-319 Index does not exist in ISAM file.
This statement refers to an index that does not exist. (The reference to an ISAM file is not relevant; ignore it.) Review the spelling of the index name; if it is as you intended, and you are sure it should exist, make sure you are using the right database.
In an ANSI-compliant database, an index that you do not own must be qualified with its owner's name. See the discussion of error -316 for a way to check the names and owners of all indexes.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-319 fires when a statement references an index by name and the server can't find it — it also appears in a second form, "Index does not exist in ISAM file," for the equivalent condition at the storage-engine level. In ANSI-compliant databases there's an extra wrinkle: an index not owned by the current user must be qualified with its owner's name, or it won't resolve even though it genuinely exists.
- A misspelled index name in a
DROP INDEX,SET INDEXES, or similar statement — the most common cause. - Wrong database connected — the index exists, but in a different database than the one the session is currently attached to.
- In an ANSI-compliant database, an unqualified reference to an index owned by a different user — the bare name doesn't resolve without the owner qualifier.
- The index was already dropped (by another session, or an earlier step in the same script) before this statement ran.
Solutions / Resolution
- Check the spelling of the index name, per the official guidance, as the first and most common fix.
- Confirm the correct database is connected if the spelling looks right.
- In an ANSI-compliant database, qualify the index name with its owner if it isn't owned by
the current user:
DROP INDEX owner_name.idx_orders_customer; - List existing indexes and their owners (the same technique used for
-316) to confirm the index's actual name and owner:SELECT idxname, tabname, owner FROM sysindexes WHERE tabname = 'orders';
Examples
Missing owner qualifier in an ANSI-compliant database
DROP INDEX idx_orders_customer;
-- -319: exists, but owned by a different user in this
-- ANSI-compliant database
Fix — qualify with the owner:
DROP INDEX app_owner.idx_orders_customer;
Confirming the index's actual name and owner first
SELECT idxname, tabname, owner FROM sysindexes WHERE tabname = 'orders';
Diagnostic Checks
- Query
sysindexesfor the table in question to confirm the index's exact name and owner. - Confirm the currently connected database matches the one the index was created in.
- If in an ANSI-compliant database, check whether an owner qualifier is needed for the reference to resolve.
Related Errors / Related Topics
- -316 — "Index index-name already exists in database." The creation-time counterpart of this
lookup failure — its addendum's
sysindexesquery technique applies here too. - -296 — "Referenced table table-name not available." A conceptually similar object-not-found error, at the table level rather than the index level.
Check spelling and the current database first; in an ANSI-compliant database, remember indexes owned by another user need an explicit owner qualifier to resolve.