We use the same user for multiple projects and I want to have a different default schema for different connection pools. Is there a way to specify the default schema in the weblogic JDBC configuration?
Asked
Active
Viewed 1.1k times
1 Answers
21
Ok, I figured it out myself:
If you go to Data Source-> Configuration -> Connection Pool -> click Advanced,
There is Init SQL
there that will be executed for initialization of newly created physical db connection, we can put:
SQL ALTER SESSION SET CURRENT_SCHEMA=animals
to make the default schema.

Roman Goyenko
- 6,965
- 5
- 48
- 81
-
Note: The `SQL ` is mandatory! (Check "Init SQL" at https://docs.oracle.com/middleware/1221/wls/FMWCH/pagehelp/Corecorepartitionservicesappjdbcmoduleconfigconnectionpooltitle.html) – Leponzo Dec 20 '21 at 16:09