12c创建用户
create user c##lyoo2 identified by oracle;
12c用户授权
SQL> grant resource,connect to c##abiao12c;
SQL> show parameter db_create
创建pdb
SQL> create pluggable database pdb_songcc admin user songcc identified by oracle;
切换pdb
SQL> alter pluggable database pdb_songcc open;
SQL> alter session set container=pdb_songcc;
查看当前pdb
SQL> show con_name
查看当前实例
SQL> select instance_name from v$instance;
sqlplus / as sysdba管理员身份连接到数据库
sqlplus / as sysdba
此时处于CDB$ROOT模式下。
show con_name;
查看CDB$ROOT下所有的pdbs
select name , open_mode from v$pdbs;
开启PDB数据库
alter pluggable database PDBEPPS open
进入pdb数据库
alter session set container=orclpdb;
关闭pdb
alter pluggable database orclpdb close;
切换回CDB$ROOT
alter session set container=cdb$root;
conn as sysdba
原文地址:https://www.cnblogs.com/xingxingdiandian/p/9184286.html