. Advertisement .
..3..
. Advertisement .
..4..
In the process of completing my work, I encountered the following problem:
ORA-65096: invalid common user or role name in oracle.
Below is the code I ran:
create user Scott identified by tiger;
What’s causing it, and how can it be resolved in the “ora-65096: invalid common user or role name“ in the programs?
The cause: You have to create the database as a container database instead of creating user in the container, i.e. CDB$ROOT, however, i think you should create the user in the PLUGGABLE database.
The solution: You can resolve the error by creating a “pluggable user” aka “local user”.
Local users belong only to a single PDB. These users may be given administrative privileges, but only for that PDB inside which they exist. For that, you should connect to pluggable datable like that:
and now, you can create user like usually:
99.9% of times, the error
ORA-65096: invalid common user or role name
indicates that you are logged in to the CDB instead of a PDB. If you have used default 19c installation settings, login to ORCLPDB instead of ORCL.DANGER– Do not create users in an unprofessional way. Follow the steps below.
Oracle Support should be consulted before setting undocumented parameters such as this (as indicated with the leading underscore). You may lose your support contract if you change these parameters without Oracle Support’s guidance. You do so at your own risk.
If you set
"_ORACLE_SCRIPT"=true
to true, data dictionary changes will occur with the column ORACLE_MAINTAINED set at ‘Y’. These users and objects may be excluded from DBA scripts. They may also be included incorrectly in system scripts.If you’re okay with the risks and want to create common users correctly, then run this command: