i want to create a user in oracle 12c but i have a problem.after i enter my user name and psw, this warning displatyed: ORA-65096: invalid common user or role name
-
What user name are you trying to create? And with what command? – Federico klez Culloca Oct 12 '18 at 09:51
-
my user name i my name and . sql> create user mojtaba identified by java123; – Mojtaba Qanbari Oct 12 '18 at 09:55
-
Anyway, check [this](https://stackoverflow.com/questions/33330968/error-ora-65096-invalid-common-user-or-role-name-in-oracle) – Federico klez Culloca Oct 12 '18 at 09:57
3 Answers
If you see this error then first you need to alter the session for oracle 12c:
alter session set "_ORACLE_SCRIPT"=true;
after running above command you can create the user. it will work for sure.
CREATE USER your_username IDENTIFIED BY your_password;

- 1,555
- 4
- 15
- 24
Connect first to your pluggableDB
CONN system/systempassword@//localhost:1521/pluggabledatabase
Than you can create your user:
create user marcopolo identified by marco9274;
Note: You must have created the database as a container database. While, you are trying to create user in the container, i.e. CDB$ROOT, however, you should create the user in the PLUGGABLE database.
You are not supposed to create objects in the container, the container holds the metadata for the pluggable databases. You should use the pluggable database for you general database operations. Else, do not create it as container, and not use multi-tenancy.
See (error: ORA-65096: invalid common user or role name in oracle)

- 13,566
- 7
- 90
- 104
connect system/manager as sysdba
alter session set "_ORACLE_SCRIPT"=true;
create user your_user_name identified by your_password;
grant dba to your_user_name;

- 29,388
- 11
- 94
- 103