Oracle 23.26SQLLab-verified · 2026-11-27

ORA-00980: synonym translation is no longer valid

The object the synonym points to no longer exists under that name.

Oracle AI Database 26ai Free 23.26.3.0.0
ORA-00980: synonym translation is no longer valid

Jump to a cause

  1. 01The table in another schema was renamed
  2. 02The synonym was created with a misspelled target name
  3. 03The table behind the synonym was dropped

Lab-verifiedReproduced and fixed on Oracle AI Database 26ai Free 23.26.3.0.0 · 2026-11-27 · container image gvenzl/oracle-free:23-slim

A synonym only stores a name. Oracle does not check that the target exists when the synonym is created, and the synonym is not updated when the target is renamed or dropped. When you then use the synonym, Oracle cannot resolve it and raises ORA-00980.

Below are three common cases reproduced on a real database, with the fix we ran and its result.

01The table in another schema was renamed

lab_a had CREATE SYNONYM codes FOR lab_b.codes. Then lab_b ran ALTER TABLE codes RENAME TO codes_v2. SELECT * FROM codes as lab_a failed with ORA-00980.

user_synonyms still showed CODES LAB_B CODES, while all_tables for LAB_B showed only CODES_V2. After CREATE OR REPLACE SYNONYM codes FOR lab_b.codes_v2, the query returned A01 Active.

Setup
Setuprun as lab_b
CREATE TABLE codes (code VARCHAR2(10) PRIMARY KEY, name VARCHAR2(30));
INSERT INTO codes VALUES ('A01', 'Active');
COMMIT;
GRANT SELECT ON codes TO lab_a;
OUTPUT
Table created.


1 row created.


Commit complete.


Grant succeeded.
Setuprun as lab_a
CREATE SYNONYM codes FOR lab_b.codes;
OUTPUT
Synonym created.
Setuprun as lab_b
ALTER TABLE codes RENAME TO codes_v2;
OUTPUT
Table altered.
Reproducerun as lab_a
SELECT * FROM codes;
✕ ERROR
SELECT * FROM codes
              *
ERROR at line 1:
ORA-00980: synonym translation is no longer valid
Help: https://docs.oracle.com/error-help/db/ora-00980/
Checkrun as lab_a
COLUMN synonym_name FORMAT A8
COLUMN table_owner FORMAT A6
COLUMN table_name FORMAT A10
COLUMN owner FORMAT A6
SELECT synonym_name, table_owner, table_name FROM user_synonyms WHERE synonym_name = 'CODES';
SELECT owner, table_name FROM all_tables WHERE owner = 'LAB_B';
OUTPUT
SYNONYM_ TABLE_ TABLE_NAME
-------- ------ ----------
CODES    LAB_B  CODES

1 row selected.


OWNER  TABLE_NAME
------ ----------
LAB_B  CODES_V2

1 row selected.
Fixrun as lab_a
CREATE OR REPLACE SYNONYM codes FOR lab_b.codes_v2;
OUTPUT
Synonym created.

The grant moves with the renamed table, so only the synonym needed fixing here. Other users' synonyms pointing at the old name break too.

After the fixrun as lab_a
SELECT * FROM codes;
✓ SUCCESS
CODE       NAME
---------- ------------------------------
A01        Active

1 row selected.

02The synonym was created with a misspelled target name

CREATE SYNONYM cust FOR custmers (missing an o) printed Synonym created. without any error. SELECT * FROM cust then failed with ORA-00980.

Joining user_synonyms to user_objects showed CUST CUSTMERS with an empty OBJECT_TYPE, meaning no such object exists. After CREATE OR REPLACE SYNONYM cust FOR customers, the query returned 1 Kim.

Setup
Setuprun as lab_a
CREATE TABLE customers (cust_id NUMBER PRIMARY KEY, name VARCHAR2(30));
INSERT INTO customers VALUES (1, 'Kim');
COMMIT;
CREATE SYNONYM cust FOR custmers;
OUTPUT
Table created.


1 row created.


Commit complete.


Synonym created.
Reproducerun as lab_a
SELECT * FROM cust;
✕ ERROR
SELECT * FROM cust
              *
ERROR at line 1:
ORA-00980: synonym translation is no longer valid
Help: https://docs.oracle.com/error-help/db/ora-00980/
Checkrun as lab_a
COLUMN synonym_name FORMAT A8
COLUMN table_name FORMAT A10
COLUMN object_type FORMAT A12
SELECT s.synonym_name, s.table_name, o.object_type FROM user_synonyms s LEFT JOIN user_objects o ON o.object_name = s.table_name WHERE s.synonym_name = 'CUST';
OUTPUT
SYNONYM_ TABLE_NAME OBJECT_TYPE
-------- ---------- ------------
CUST     CUSTMERS

1 row selected.
Fixrun as lab_a
CREATE OR REPLACE SYNONYM cust FOR customers;
OUTPUT
Synonym created.

Because CREATE SYNONYM succeeds even for a missing target, check the synonym with a SELECT right after creating it.

After the fixrun as lab_a
SELECT * FROM cust;
✓ SUCCESS
   CUST_ID NAME
---------- ------------------------------
         1 Kim

1 row selected.

03The table behind the synonym was dropped

Synonym ord pointed to orders, and then DROP TABLE orders was run. SELECT * FROM ord failed with ORA-00980.

user_recyclebin showed ORDERS DROP with its drop time, so the table was still in the recycle bin. FLASHBACK TABLE orders TO BEFORE DROP restored it, and the synonym worked again without changes: 100 5000.

Setup
Setuprun as lab_a
CREATE TABLE orders (order_id NUMBER PRIMARY KEY, amount NUMBER);
INSERT INTO orders VALUES (100, 5000);
COMMIT;
CREATE SYNONYM ord FOR orders;
DROP TABLE orders;
OUTPUT
Table created.


1 row created.


Commit complete.


Synonym created.


Table dropped.
Reproducerun as lab_a
SELECT * FROM ord;
✕ ERROR
SELECT * FROM ord
              *
ERROR at line 1:
ORA-00980: synonym translation is no longer valid
Help: https://docs.oracle.com/error-help/db/ora-00980/
Checkrun as lab_a
COLUMN original_name FORMAT A10
COLUMN operation FORMAT A9
COLUMN droptime FORMAT A19
SELECT original_name, operation, droptime FROM user_recyclebin WHERE original_name = 'ORDERS';
OUTPUT
ORIGINAL_N OPERATION DROPTIME
---------- --------- -------------------
ORDERS     DROP      2026-11-27:17:27:40

1 row selected.
Fixrun as lab_a
FLASHBACK TABLE orders TO BEFORE DROP;
OUTPUT
Flashback complete.

This only works if the table is still in the recycle bin (not dropped with PURGE and not purged since). Otherwise, recreate the table or point the synonym elsewhere.

After the fixrun as lab_a
SELECT * FROM ord;
✓ SUCCESS
  ORDER_ID     AMOUNT
---------- ----------
       100       5000

1 row selected.

FAQ

What does ORA-00980 mean?

The synonym exists, but the object it names does not, usually because it was renamed or dropped, or the name was misspelled.

How do I see what a synonym points to?

Query user_synonyms (or all_synonyms) for table_owner and table_name, then check that object in all_objects or all_tables.

Why did CREATE SYNONYM succeed if the table does not exist?

Oracle does not check the target when creating a synonym. In our test a misspelled name gave Synonym created. and failed only when used.

How do I fix ORA-00980 after a table was dropped?

If it is in user_recyclebin, run FLASHBACK TABLE name TO BEFORE DROP. The synonym works again without being recreated.

How we verify

Each scenario starts from fresh database users. A script runs the setup, confirms the exact error code, applies the fix and runs the statement again. The output shown is what the database printed, saved by the script.

lab_a and lab_b are ordinary users created for the test; system is the DBA account. Oracle AI Database 26ai Free Release 23.26.3.0.0 - Develop, Learn, and Run for Free 23.26.3.0.0