CDB/PDB深刻學習

改變PDB大小
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED數據庫


2 PDB$SEED                       READ ONLY  NO
     3 PDBTEST                        MOUNTED
     4 CLONEPDB_PLUG                  MOUNTED

SQL> ALTER PLUGGABLE DATABASE STORAGE(MAXSIZE UNLIMITED);
ALTER PLUGGABLE DATABASE STORAGE(MAXSIZE UNLIMITED)
*
第 1 行出現錯誤:
ORA-65046: 不容許從可插入數據庫外部執行該操做
SQL> alter session set container=PDBTEST;
會話已更改。session

SQL> ALTER PLUGGABLE DATABASE STORAGE(MAXSIZE UNLIMITED);
ALTER PLUGGABLE DATABASE STORAGE(MAXSIZE UNLIMITED) *
第 1 行出現錯誤:
ORA-01219: 數據庫或可插入數據庫未打開: 僅容許在固定表或視圖中查詢ide

SQL> startup 插接式數據庫已打開。
SQL> show pdbscode

CON_ID CON_NAME                       OPEN MODE  RESTRICTED                                                         ---------- ------------------------------ ---------- ----------
     3 PDBTEST                        READ WRITE NO

SQL> ALTER PLUGGABLE DATABASE STORAGE(MAXSIZE UNLIMITED);it

插接式數據庫已變動。io

SQL> alter session set container=CDB$ROOT;class

會話已更改。數據

SQL> SELECT SYS_CONTEXT ('USERENV', 'CON_NAME') FROM DUAL;查詢

SYS_CONTEXT('USERENV','CON_NAME')

CDB$ROOTdb

SQL> show pdbs

CON_ID CON_NAME                       OPEN MODE  RESTRICTED

2 PDB$SEED                       READ ONLY  NO
     3 PDBTEST                        READ WRITE NO
     4 CLONEPDB_PLUG                  MOUNTED
相關文章
相關標籤/搜索