Search code examples
databaseoracleoracle-apexoracle-rest-data-services

Oracle APEX - ORDS_PUBLIC_USER is a common user [...] require CDB$ROOT connection


Let's say first that i'm a noob with server and i jumped to linux world only an year ago... I'm trying to set up my Oracle APEX installation on Oracle Linux 9 (in a VM) for develop a custom software for my little business (following this tutorial link

I've already installed database and APEX but when i try to configure ORDS with ords --config /etc/ords/config install i'm facing some trouble.

First the ORDS_PUBLIC_USER was blocked due to my failed login but i managed to unlock it and go on, but now, after putting the db SYS password the config say:

"Retrieving information. Connecting to database user: ORDS_PUBLIC_USER url: jdbc:oracle:thin:@//localhost:1521/FREEPDB1 Cannot change the password for ORDS_PUBLIC_USER in the database because ORDS_PUBLIC_USER is a common user. Password change requires the connection to CDB$ROOT."

Honestly i can't find anything about this problem online.

In the past i've sperimented a bit with APEX using the Virtualbox preconfigured files but now i've moved to QEMU/KVM and i'm trying to set up a complete system

NB. following the tutorial in the link i noticed that every time i connfigure ORDS it didn't ask me for "default tablespace" and "temp tablespace", it jump directly on the "recap" page.

Tried multiple time to redo the ORDS installation, deleting ORDS package and config files and reistalling it with on luck. seems that ORDS_PUBLIC_USER has not Root permission but nobody ask nothing about it during install.


Solution

  • I don't think is an ORDS issue directly, but a multi-tenant issue.

    Most likely explanation here is that you have installed ORDS into the root container, rather than one of the pluggables.

    Quick background: You create a database called "MYDB". This will (assuming defaults) create a "root" container called "MYDB" and a pluggable database (think of it as a "sub-database" under the root) called "MYDBPDB1".

    Both are valid databases in the sense of the world, but the root database is typically meant to just be an umbrella over 1 or more pluggables. Your "real" work is done in the pluggables.

    Thus (keeping my names above) if you install ORDS and at the prompt for database, you specified "MYDB", then we're installing ORDS into the root database, and it will then be a single ORDS installed for the root and all of the pluggables. That is allowed but not something we normally recommend.

    Because ORDS in the root spans all database, the various user accounts it sets up are defined as "common users", hence the kind of errors you might be seeing.

    We recommend people install ORDS into the pluggable, thus you would specify MYDBPDB1 during ORDS installation.

    If you're at a point where you can blow this all away and start again, make sure you install APEX and ORDS into the pluggable not the root.