8

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

Mojtaba Qanbari
  • 93
  • 1
  • 1
  • 4

3 Answers3

23

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;
Govind Gupta
  • 1,555
  • 4
  • 15
  • 24
1

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)

Hrvoje
  • 13,566
  • 7
  • 90
  • 104
-1

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;
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103