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?
A connection pool is a named group of identical JDBC connections to a database that are created when the connection pool is deployed, either at WebLogic Server startup or dynamically during run time. Your application "borrows" a connection from the pool, uses it, then returns it to the pool by closing it.
Schema is a logical namespace that contains database objects such as tables, views, indexes, etc. Each schema belongs to one database, and each database has at least one schema. If not specified otherwise, the default schema in PostgreSQL is public.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With