--确认当前cdb
SQL> select name,cdb from v$database; NAME CDB ------------------ ------ ORCL YES
--查询当前pdb基本信息
col pdb_name for a30 select pdb_id,pdb_name,dbid,status,creation_scn from dba_pdbs; select con_id,dbid,NAME,OPEN_MODE from v$pdbs;
创建使用者
SQL> create user c##test identified by test; SQL> alter session set container=pdb1; SQL> show con_name; SQL> show con_name;
CON_NAME ------------------------------ PDBORCL
创建真正的用户
SQL> create user test identified by test default tablespace users temporary tablespace temp;
授权
grant create user,drop user,alter user,create any view,connect,resource,dba,create session,create any sequence to test
原文:http://my.oschina.net/lyle001/blog/330295