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.

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top