My Oracle Support Banner

ora-942 when Accessing dba_registry_sqlpatch View (Doc ID 2180541.1)

Last updated on OCTOBER 31, 2022

Applies to:

JDBC - Version 12.1.0.2.0 and later
Information in this document applies to any platform.

Symptoms

From within a Java program using JDBC 12.1.0.2 when running the query below, the table is not found.
It works on all 12c database environments, but it does not work in any of the 11g environments.

select VERSION, PATCH_ID, DESCRIPTION from sys.dba_registry_sqlpatch

 

Exception in thread "main" java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1059)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:522)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:587)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:210)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:30)
at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:762)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:925)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1111)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1309)
at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:422)
at getDBpatchset.main(getDBpatchset.java:82)

ERROR
-----------------------
ORA-00942: table or view does not exist


STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Create a Java program that executes the query select VERSION, PATCH_ID, DESCRIPTION from sys.dba_registry_sqlpatch.
2.Run the java program against an 11g database.
It will fail with ORA-00942: table or view does not exist

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.