Informix Error -390
-390 Synonym already used as table name or synonym.
This CREATE SYNONYM statement names a synonym that is already in use. To see all the synonym and table names currently defined, query systables as follows:
SELECT tabname, owner FROM systables WHERE tabid > 99
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-390 is the synonym-level counterpart of -310: synonyms share the same namespace as table
names within a database, so CREATE SYNONYM fails if the chosen name is already in use by either
an existing table or another existing synonym.
- A
CREATE SYNONYMstatement using a name already assigned to a table — the direct cause. - A
CREATE SYNONYMstatement using a name already assigned to another synonym. - Running a setup/migration script more than once without a preceding existence check.
- Wrong database connected — the name conflicts in the database the session is actually attached to, not the one intended.
Solutions / Resolution
- Query
systablesto review existing table names and synonyms, per the official guidance:
(System catalog tables occupySELECT tabname, owner FROM systables WHERE tabid > 99;tabidvalues 99 and below, so this filters to user objects.) - Choose a genuinely available name for the new synonym.
- For repeatable setup scripts, check for the name's existence first before attempting
CREATE SYNONYM.
Examples
Checking existing names before creating a synonym
SELECT tabname, owner FROM systables WHERE tabid > 99;
-- confirm the intended synonym name isn't already a table or
-- synonym in this database
Re-running a setup script safely
SELECT tabname FROM systables WHERE tabname = 'cust' AND tabid > 99;
-- if found, skip CREATE SYNONYM or DROP SYNONYM first
CREATE SYNONYM cust FOR customers;
Diagnostic Checks
- Query
systablesfor the intended synonym name, filtered to user objects (tabid > 99). - Confirm the currently connected database matches the one the script was intended for.
Related Errors / Related Topics
- -310 — "Table table-name already exists in database." The table-level counterpart of this same shared-namespace uniqueness restriction.
- -316 — "Index index-name already exists in database." Another already-exists restriction, in a separate (index) namespace rather than the shared table/synonym one.
Synonyms and table names share one namespace per database — check systables (not just existing
synonyms) before choosing a new synonym name.