The command is not correct. It is "alter session set current_schema".
Getting exception while running multi-tenance code using Hibernate
-
14-06-2023 - |
Question
I am trying to run a multi-tenancy example following this link
But, executing the code I am getting the below exception
Caused by: java.sql.SQLSyntaxErrorException: ORA-00922: missing or invalid option
It is coming at
connection.createStatement().execute("SET SCHEMA 'public'");
and even commenting the above line, the same exception is coming at
connection.createStatement().execute("SET SCHEMA '" + tenantIdentifier + "'");
Please provide your valuable inputs.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow