Setting CURRENT_SCHEMA Has No Effect When Working With User-Defined Types
(Doc ID 1580729.1)
Last updated on MARCH 08, 2017
Applies to:JDBC - Version 22.214.171.124 to 126.96.36.199.0 [Release 9.2 to 12.1]
Information in this document applies to any platform.
When using the JDBC driver, setting CURRENT_SCHEMA appears to have no effect against user-defined types.
Consider the following example:
* User1 creates a user-defined type.
* User2 is granted execute privileges to this type via a role, and creates a private synonym for this type.
* User3 is granted execute privileges to this type via a role, but creates no synonyms.
* You set CURRENT_SCHEMA to be User2, either via a trigger, or directly within the Java code with lines similar to the following:
alterStatement.execute("alter session set current_schema=User2");
Your Java program calls createDescriptor() for this type. The result:
* User2 works
* User3 fails.
When using the JDBC OCI driver, the failure consists the following error:
ORA-4043: Object does not exist
When using the JDBC Thin driver, the failure consists of the following error:
java.sql.SQLException: invalid name pattern
This behavior reproduces for every currently-supported version of the JDBC driver.
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
|This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.|