I just installed Oracle XE 18c (I migrated from 11g XE) ... After running the installer, I saw new features; for example, Oracle now supports a multitenat model and a concept called pluggable databases ...

The first problem that I found was creating a new user ... it appears that in order to support the concept of pluggable databases, user names must comply with some naming rule prefixes (i.e. c##) ... Searching about the problem, I found this link ... They suggest that to create a user using the old syntax (the one used on non-CDB), we should alter the session using:

alter session set "_ORACLE_SCRIPT"=true;

But, they warn that the user cannot be used in any pluggable database ...

So, this is my question: If a create the user after submitting the command, is the user created in the ROOT Container (CDB$ROOT)? Such user will be local to the Oracle instance and can be used to administrate all other pluggable databases, including the CDB (assuming that such user has all required permissions)?


Disclaimer: I'm not a DBA, I'm just a software developer with advance knowledge about databases ...

  • To say it clear: You should not use the _ORACLE_SCRIPT parameter.
    – miracle173
    Jun 13 '20 at 5:30

Yes, common users, those starting with C##, will be created in the CDB. They will available in all PDBs (assuming they have the correct permissions).

If you need to create a user in the PDB, make sure you connect to the PDB ( SID=XEPDB ) not the CDB (SID=XE )


After digging around about "_ORACLE_SCRIPT"=true command and doing some tests in the database, I came to the following conclusions:

  • The _ORACLE_SCRIPT"=true is a powerful command. Because it's is a underscore parameter, it's expected to be private and use only for Oracle ... however, it seems to be valid cases when it should be used, for example, this one (but these are suppose to be very rare) ...

  • In the case presented by me, I was turning off some database guards when I issued the command _ORACLE_SCRIPT"=true, allowing to bypass the required syntax to create "commons" users ... The user was being created in the root container (aka, CDB$ROOT) ... I could validated this through two queries:



    The first query shows the current container, and the second one shows the users available in such container.

    The weird part comes from querying the view ´all_users´, it says that the user, which I just created, is a common user that is "ORACLE_MAINTAINED" (which is not) ... Sadly, such user is not really common because you can't access other pluggable databases with him (as the link that I provided says) and It doesn´t exist in other pluggable databases ...

So, to summarize: The user was created in the CDB$ROOT bypassing Oracle syntax rules, but such user is only local to such container ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.