I want to create a user from JDBC (if possible) in an ORACLE Express database. That user can't have the ORACLE_MAINTAINED
flag in the DBA_USERS
view.
Trying CREATE USER newuser IDENTIFIED BY xxx
, but it throws a ORA-65096: invalid common user or role name
. To avoid it, I had to set the flag ALTER SESSION SET "_ORACLE_SCRIPT"=TRUE
, as other posts recommend. But that way, it's marked as ORACLE_MAINTAINED
.
I'm connecting to the xe
default database.
Context:
I'm working with the Oracle Docker image; it's for integration testing purposes. The metadata queries the app uses exclude ORACLE_MAINTAINED='Y'
users/tables, and I'm not able to list them (not working with data, just metadata). I could remove the WHERE from the queries, but I would prefer to avoid it, and keep the app queries untouched.
Thanks!