oracle 12c 多租戶 pdb 恢復(單個pdb數據文件、非系統pdb表空間、整個pdb數據庫)
環境:數據庫版本 Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
實驗準備:
1.-- 數據庫歸檔模式
SQL> select name,log_mode from v$database;
NAME LOG_MODE
--------- ------------
ANDYCDB ARCHIVELOG > 數據庫歸檔模式
2.-- 登錄 PDB 中創建實驗表空間 與 用戶
[[email protected] ~]$ sqlplus [email protected]
SQL>
create tablespace bbb logging datafile ‘/home/oracle/app/oracle/oradata/andycdb/pdb01/bbb.dbf‘
size 1m autoextend on next 1m maxsize 2m extent management local;
Tablespace created.
SQL>alter tablespace bbb add datafile ‘/home/oracle/app/oracle/oradata/andycdb/pdb01/bbb02.dbf‘size 1M
autoextend on next 1m maxsize 2m ;
Tablespace altered.
create user andy identified by andy default tablespace users;
create user bbb identified by bbb default tablespace bbb;
grant dba to andy;
grant dba to bbb;
3.-- 備份整個CDB及其下面的所有PDB
[[email protected]