Informix Error -320
-320 Not owner of index.
This statement tries to do something, such as dropping an index, that only the owner of the index or a user who has Database Administrator privileges can do. Check that the statement names the index that you intended. If it does, you will have to get its owner or a DBA to execute this statement. See the discussion of error -316 for a way to list the names and owners of indexes.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-320 is the index-level counterpart of -313: an operation requiring index ownership (most
commonly DROP INDEX) was attempted by a user who is neither the index's owner nor a database
administrator.
- Attempting
DROP INDEX(or a similarly ownership-gated operation) as a non-owner, non-DBA user — the direct cause. - An index created by a different application/service account than the one currently attempting to drop or modify it.
- In an ANSI-compliant database, an index owned by a different user with the same base name
as one the current user expected to own — see
-319's owner-qualification note. - Confusing table ownership with index ownership — owning the underlying table doesn't automatically grant ownership of every index built on it if a different user created the index.
Solutions / Resolution
- Verify the target index and its actual owner, per the official guidance:
SELECT idxname, tabname, owner FROM sysindexes WHERE idxname = 'idx_orders_customer'; - Coordinate with the index owner or a DBA to execute the statement, since ownership can't be bypassed by table ownership alone.
- Identify database administrators if the owner is unavailable:
SELECT username FROM sysusers WHERE usertype = 'D';
Examples
Attempting to drop an index owned by a different user
DROP INDEX idx_orders_customer;
-- -320: the current user isn't the index's owner and isn't a DBA
Fix — find the actual owner first, then have them (or a DBA) run it:
SELECT idxname, owner FROM sysindexes WHERE idxname = 'idx_orders_customer';
-- ask the owner (or a DBA) to run the DROP INDEX
Diagnostic Checks
- Confirm the exact index name and its owner via
sysindexes. - Confirm the current session's username matches the index's owner, or that the session has DBA privileges.
- Don't assume table ownership implies index ownership — check the index's own owner column separately.
Related Errors / Related Topics
- -313 — "Not owner of table." The table-level counterpart of this same ownership restriction.
- -319 — "Index does not exist." A related index-reference error — relevant here too since an ANSI-compliant database may need the owner qualifier to even find the right index.
Owning the underlying table doesn't grant ownership of an index another user created on it — check the index's own owner separately before assuming a permission bug.