- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2025 11:29 AM
Here is something to consider:
The issue you're experiencing likely stems from differences in behavior when accessing Oracle database objects via Spark JDBC versus other database clients like DBeaver. Specifically, Spark's JDBC interface may perform pre-checks or validation processes on the table schema before executing queries, which could trigger errors such as java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist. These checks can occur irrespective of the context or session settings that you apply, such as switching to the root container with ALTER SESSION SET CONTAINER = CDB$ROOT.
The behavior you're observing, where a straightforward query (SELECT sys_context('USERENV','CON_NAME') AS container_name FROM dual) works successfully, but other queries like SELECT * FROM SYS.V_$ARCHIVED_LOG fail, aligns with Spark's JDBC interface potentially validating table existence in a manner distinct from DBeaver. The table SYS.V_$ARCHIVED_LOG may not be directly accessible due to permissions or session scoping issues when accessing schema objects through Spark
Given this, to address your issue:
- Ensure that the user credentials provided in the JDBC connection have sufficient permissions to access
SYS.V_$ARCHIVED_LOGwithin the specified container.
Hope this helps, Lou.