Informix Error -351
-351 Database contains tables owned by other users.
This DROP DATABASE or UPDATE STATISTICS statement cannot be carried out for the reason shown. It might destroy the work of others. In order to drop this database, you must first drop all tables that other users own. To do so, you must have database administrator privilege. See the discussion of error -313 for a way to list the names of all tables with their owners.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-351 is a protective restriction on DROP DATABASE (and certain database-wide operations like
UPDATE STATISTICS): the server refuses to proceed while the database still contains tables
owned by users other than the one issuing the statement, to avoid destroying or affecting work
that isn't the current user's to discard.
- Attempting
DROP DATABASEon a database that has tables created by multiple users — the most common cause, especially in shared development or multi-application databases. - A database originally set up by one user/team, later extended by others, where the person now trying to drop it doesn't own everything in it.
- Leftover tables from other projects or experiments by different users that were never cleaned up, blocking an otherwise-intended full database drop.
Solutions / Resolution
- Identify all tables and their owners in the database first, per the official guidance:
SELECT tabname, owner FROM systables WHERE tabtype = 'T'; - Drop all tables owned by other users first — this requires database administrator
privileges, since an ordinary user can't drop another user's tables (see
-313). - Coordinate with the other table owners before removing their tables, in case any are still needed — a DBA doing the drop doesn't imply the data is safe to discard.
- Once every table in the database is owned by the current user (or removed), retry the
original
DROP DATABASE/UPDATE STATISTICSoperation.
Examples
Listing tables and owners before attempting a drop
SELECT tabname, owner FROM systables WHERE tabtype = 'T';
Dropping tables owned by other users (as a DBA)
-- As a DBA, after confirming with stakeholders these are safe to remove:
DROP TABLE other_user.old_experiment_table;
Diagnostic Checks
- Query
systablesfor all permanent tables in the database and their owners. - Confirm DBA privileges are available for whoever will drop the other users' tables.
- Confirm with the actual table owners before removing anything, even with DBA privileges to do so.
Related Errors / Related Topics
- -313 — "Not owner of table." The underlying ownership restriction this error's resolution path runs into — a DBA is required to drop tables owned by other users.
- -330 — "Cannot create or rename the database." Another database-lifecycle error, on the creation/rename side rather than the drop side.
This is a protective guardrail, not a bug — coordinate with other table owners before using DBA privileges to clear the way for a full database drop.