Setting CURRENT_SCHEMA Has No Effect When Working With User-Defined Types
(Doc ID 1580729.1)
Last updated on MARCH 15, 2019
Applies to:JDBC - Version 18.104.22.168 to 22.214.171.124.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:
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