I don’t work with Oracle database atm, but I checked how one would make a JDBC connection.
Turns out, with Oracle, each user has their own schema and that is their default schema.
You can not put that into JDBC connection string.
One user owns the schema, and when logging in, uses the schema name as the user and then the password. Other users can use objects in that schema, but they need grant, and they do not own it.
Some workarounds are mentioned, such as executing SQL statement to change the default schema after the user is logged in:
ALTER SESSION SET CURRENT_SCHEMA=anotherschema
and that it can be done with a logon trigger on the user and/or database. Huh ?!
create or replace trigger SET_SCHEMA_AFTER_LOGON
after logon on database
begin
execute immediate 'alter session set CURRENT_SCHEMA=anotherschema';
end SET_SCHEMA_AFTER_LOGON;
Try this one too, USERNAME[SCHEMA_NAME]
redemais.datasource.url=jdbc:oracle:thin:@[IPSERVIDOR]:1521:[BANCO]
redemais.datasource.username=usuario[anotherschema]
redemais.datasource.password=senhadobanco
Some people say that with [] after the username one can specify the schema.
I also know that some annotations in Spring can be parametrized by the values from application.settings , but let’s first see if [] can solve your problem.
Kind regards,
Mladen