Informix Error -313
-313 Not owner of table.
This statement tries to do something, such as dropping a table, that only the owner of the table or a user who has Database Administrator privileges can do. Check that the statement names the table you intended. If it does, you will have to get its owner or a DBA to execute this statement. To find out who to contact, you can query the system catalog as follows:
SELECT tabname, owner FROM systables WHERE tabid > 99; SELECT username FROM sysusers WHERE usertype = 'D'
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-313 fires when an operation that requires table ownership (or DBA privileges) — most commonly
DROP TABLE or ALTER TABLE — is attempted by a user who is neither the table's owner nor a
database administrator.
- Attempting
DROP TABLE/ALTER TABLE(or a similarly ownership-gated operation) as a non-owner, non-DBA user — the direct cause. - A table created by a different application/service account than the one currently attempting to modify it — common when multiple accounts share a database.
- Assuming a granted privilege (like
SELECT/INSERT) is sufficient for structural operations like dropping or altering a table, when those specifically require ownership or DBA rights. - A misspelled table name that happens to resolve to a same-named table owned by a different user (relevant in ANSI-compliant databases where per-user tables of the same name can coexist).
Solutions / Resolution
- Verify the table name is correct first, per the official guidance — in ANSI-compliant databases, a same-named table can exist under a different owner.
- Identify the table's actual owner:
SELECT tabname, owner FROM systables WHERE tabname = 'orders'; - Contact the table owner or a DBA to execute the statement, or have them grant the necessary structural privilege if the operation should be repeatable by the current user.
- Identify current database administrators if the owner is unavailable:
SELECT username FROM sysusers WHERE usertype = 'D';
Examples
Attempting to drop a table owned by someone else
DROP TABLE orders;
-- -313: the current user isn't the owner of orders and isn't a DBA
Fix — find the actual owner first, then have them run it (or a DBA):
SELECT tabname, owner FROM systables WHERE tabname = 'orders';
-- ask the owner (or a DBA) to run the DROP TABLE
Checking for DBA users when the owner is unavailable
SELECT username FROM sysusers WHERE usertype = 'D';
Diagnostic Checks
- Confirm the exact table name and its owner via
systables. - Confirm the current session's username matches the table's owner, or that the session has DBA privileges.
- In an ANSI-compliant database, check whether a same-named table exists under a different owner — this can look like the "same" table but actually isn't.
Related Errors / Related Topics
- -302 — "No GRANT option or illegal option on multi-table view." Another ownership/privilege-gated operation in the same general access-control family.
Only the table's owner or a DBA can perform structural operations like DROP TABLE/ALTER TABLE — an ordinary data privilege like SELECT or INSERT isn't sufficient.