首页 > 代码库 > Oracle 12c 操作 CDB PDB

Oracle 12c 操作 CDB PDB

CREATE TRIGGER open_all_pdbs   AFTER STARTUP   ON DATABASEBEGIN   EXECUTE IMMEDIATE ‘alter pluggable database all open‘;END open_all_pdbs;/alter pluggable database all openalter pluggable database all close;alter session set container = pdbmyoracle;alter session set container = CDB$ROOT;create tablespace TBS_DYS datafile  ‘D:/Oracle_12c/app/dys/oradata/DYS/TBS_DYS.ba‘ size 1024m reuse   autoextend on     next 100m     maxsize UNLIMITED extent management local;CREATE TEMPORARY TABLESPACE TBS_DYS_TEMP TEMPFILE  ‘D:/Oracle_12c/app/dys/oradata/DYS//TBS_DYS_TEMP.ba‘ SIZE 600M     autoextend on       next 32m       maxsize 2048m extent management local; CREATE USER dingyingsi IDENTIFIED BY Dingyingsi1988 DEFAULT TABLESPACE TBS_DYS TEMPORARY TABLESPACE TBS_DYS_TEMP ACCOUNT UNLOCK;GRANT CREATE TABLE TO dingyingsi;GRANT UNLIMITED TABLESPACE TO dingyingsi;GRANT CONNECT TO dingyingsi WITH ADMIN OPTION;GRANT RESOURCE TO dingyingsi WITH ADMIN OPTION;GRANT DBA TO dingyingsi;