ORA-65096: invalid common user or role name ( Oracle database 12c)


SQL> conn / as sysdba
Connected.
SQL> create user anar identified by anar;
create user anar identified by anar
 *
ERROR at line 1:
ORA-65096: invalid common user or role name
SQL> SHOW CON_NAME
CON_NAME
------------------------------
CDB$ROOT
SQL> SELECT PDB FROM V$SERVICES;
PDB
------------------------------
PDBORCL
CDB$ROOT
CDB$ROOT
CDB$ROOT
CDB$ROOT
SQL> alter session set container=PDBORCL;
Session altered.
SQL> SHOW CON_NAME
CON_NAME
------------------------------
PDBORCL
SQL> CREATE USER anar IDENTIFIED BY anar;
CREATE USER anar IDENTIFIED BY anar
 *
ERROR at line 1:
ORA-01109: database not open
SQL> ALTER DATABASE OPEN;
Database altered.
SQL> CREATE USER anar IDENTIFIED BY anar;
User created.
SQL> GRANT CONNECT, RESOURCE, DBA TO anar;
Grant succeeded.
SQL>

One comment

  1. SamratBasra · · Reply

    this is nice, saved my day.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: