Ora-00942 Followed By Ora-01003 When A Public Synonym Is Dropped And Recreated Again (Doc ID 1401206.1)

Last updated on MARCH 08, 2017

Applies to:

JDBC - Version: 10.2.0.5 to 11.2.0.3.0 - Release: 10.2 to 11.2
Information in this document applies to any platform.

Symptoms

  Having the next environment:

Database 1

  • 10.2.0.4
  • Schema with a table and a public synonym to this table.

Database 2

  • 10.2.0.4
  • Schema with a stored procedure which makes a select on the table on the database 1 using the public synonym
  • Database link to the database 1 and using the schema in database 1.


When there is a jdbc application running and this application is connecting to the schema in database 2 all works fine, but if on the database 1 the public synonym is deleted the next error are shown:


java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
ORA-02063: preceding line from UIVR
ORA-06512: at "FLODS.ORACLE_TEST_PRC", line 8


And after this the public synonym is created again the next error is shown:


java.sql.SQLException: ORA-01003: no statement parsed
ORA-02063: preceding line from UIVR
ORA-06512: at "FLODS.ORACLE_TEST_PRC", line 8


While is should work as the synonym was recreated.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms