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.

Was it helpful?

Solution

The command is not correct. It is "alter session set current_schema".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top