在Oracle 12c instance (带有container)下直接create user会报错ORA-65096:
Oracle 12c 出现通用用户(common user) 和 本地用户(local user)
SQL> create user dbm identified by pass default tablespace large temporary tablespace temp;
create user dbm identified by pass default tablespace LARGE temporary tablespace temp
*
ERROR at line 1:
ORA-65096: invalid common user or role name
SQL> show con_name
CON_NAME
------------------------------
CDB$ROOT
//在容器CDB$ROOT创建common user ,要以C## 或c##开头,如:
1. Common user will be created under root container only;
2. Current container mu be set to CDB$ROOT
SQL> CREATE USER C##dbm identified by pass;
User created.
SQL> create user c##dbm identified by pass container=all;
create user c##dbm identified by pass container=all
*
ERROR at line 1:
ORA-01920: user name 'C##DBM' conflicts with another user or role name
// 在PDB上创建一个local user
SQL> alter session set container=diccon;
Session altered.
SQL> show con_name
CON_NAME
------------------------------
DICCON
SQL> sho con_name
CON_NAME
------------------------------
DICCON
SQL> create user dbm identified by pass default tablespace users temporary tablespace temp;
User created.