先说基本用法:
先按11G之前进行
conn / as sysdba;
create user test identifed by test;
ORA-65096: 公用用户名或角色名无效.
查官方文档得知“试图创建一个通用用户,必需要用C##或者c##开头”,这时候心里会有疑问,什么是common user?不管先建成功了再说
create C##user test identifed by test;
创建成功
SQL>show con_name;
CON_NAME
------------------------------
CDB$ROOT
select
con_id,dbid,
NAME
,OPEN_MODE
from
v$pdbs;
CON_ID DBID NAME OPEN_MODE
---------- ---------- ------------------------------
----------
2 4066409480 PDB$SEED READ ONLY
3 2270995695 PDBORCL MOUNTED
SQL>alter session set container=PDBORCL;
这时再用create user test identifed by test;建立用户就可以了。