Using SQLDeveloper 4.0.1.14 to create an export script (separate files & "drops" checked), it generated me those 4 lines among others in DROP.sql
:
DROP SYNONYM "PUBLIC"."DUAL";
DROP SYNONYM "PUBLIC"."DBMS_SQL";
DROP SYNONYM "PUBLIC"."DBMS_LOCK";
DROP SYNONYM "PUBLIC"."DBMS_OUTPUT";
Now that I have accidentally passed the whole script using SYSTEM
user, I can no longer do modification (create or drop tables) to the database, I have that error popping:
An error was encountered performing the requested operation:
ORA-00604: error occurred at recursive SQL level 1
ORA-00942: table or view does not exist
00604. 00000 - "error occurred at recursive SQL level %s"
*Cause: An error occurred while processing a recursive SQL statement
(a statement applying to internal dictionary tables).
*Action: If the situation described in the next error on the stack
can be corrected, do so; otherwise contact Oracle Support.
Vendor code 604
The problem is that I'm getting that error event when I try this:
CREATE OR REPLACE PUBLIC SYNONYM "DUAL" FOR "SYS"."DUAL";
I precise that the SYS.DUAL
table still exists as SELECT 1 FROM SYS.DUAL
works but SELECT 1 FROM DUAL
fails with ORA-00942: table or view does not exist
.
I tried to recreate the synonym as SYSTEM
and SYSDBA
with the same failure.
Can I recreate those synonyms with another way?