//开启数据库

sqlplus / as sysdba; //登录连接CDB,默认是root container;
startup open; //open 模式,但此时的pdb模式是mounted,需要手工开启PDB
SQL> alter session set container=PDB; //切换到某个pdb
SQL> alter pluggable database open; //开启选定的pdb
SQL> alter pluggable database all open; //开启全部pdb


//关闭数据库
SQL> alter pluggable database all close; //关闭所有dpb
SQL> alter session set container=PDB; //切换到某个pdb
SQL> shutdown immediate;

SQL> alter session set container = CDB$ROOT; //切换到cdb
SQL> shutdown immediate;

设置PDB随CDB启动而启动
SQL> alter pluggable database pdb save state;