Select Failed with ORA-00980: synonym translation is no longer valid

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
Problem Description:
Select from a synonym is failed with ORA-00980: synonym translation is no longer valid. There are few reasons for this error.
  1. Check the underlying table is deleted or not. If you still need the table and synonym check the table is available in recycle bin and restore it back.
  1. Check whether you created the synonym for a non existing object.
  2. Check whether the user has been deleted where your synonym is pointing to.

See some relevant examples here.

Example 1. Deleting the synonym resolving reference object
SQL> create synonym SYN_employee for employee;

Synonym created.

SQL> select * from SYN_employee;

EMP_NAME                             DEPT        SAL
------------------------------ ---------- ----------
Rupal                                  10       5000
Hero                                   10       5500
Jain                                   10       4000
John                                   20       6000

SQL> drop table employee;

Table dropped.

SQL>  select * from SYN_employee;
 select * from SYN_employee
               *
ERROR at line 1:
ORA-00980: synonym translation is no longer valid

SQL> flashback table employee to before drop;

Flashback complete.

SQL> select * from SYN_employee;

EMP_NAME                             DEPT        SAL
------------------------------ ---------- ----------
Rupal                                  10       5000
Hero                                   10       5500
Jain                                   10       4000
John                                   20       6000

Example 2. Create a synonym for a non existing object.

SQL> create synonym syn_wrong for dept;

Synonym created.

SQL> select * from syn_wrong;
select * from syn_wrong
              *
ERROR at line 1:
ORA-00980: synonym translation is no longer valid


SQL> desc dept;
ERROR:

_____________________________________________________________________________________________________________________

A visitor from Saint joseph viewed 'Steps to Setup / Configure Data Guard and Broker o' 2 mins ago
A visitor from Riyadh viewed 'Data Pump EXPDP IMPDP EXCLUDE and INCLUDE Options ' 40 mins ago
A visitor from Muscat viewed 'Expdp failed with ORA-39047 ORA-39047: Jobs of typ' 1 hr 4 mins ago
A visitor from Moscow viewed 'Oracle INDEX hint : Different usage syntax for per' 1 hr 50 mins ago
A visitor from Ramallah viewed 'Data Pump EXPDP : How to EXCLUDE table partition e' 3 hrs 17 mins ago

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-25 All Rights Reserved | Site Map | Contact | Disclaimer