Oracle 19c多租户:若只有pdb数据库文件,如何将PDB插入到CDB?
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Oracle 19c多租户:若只有pdb数据库文件,如何将PDB插入到CDB?相关的知识,希望对你有一定的参考价值。
参考技术A -- Generate xml file of pdbBEGIN
DBMS_PDB.RECOVER(PDB_DESCR_FILE => '/yxq5/lomon/ODBA_AO_011_011.xml',
PDB_NAME => 'ODBA_AO_011_011',
FILENAMES => '/yxq5/lomon');
END;
/
-- Check compatibility of pdb
SET SERVEROUTPUT ON
DECLARE
theResult BOOLEAN;
BEGIN
theResult := DBMS_PDB.check_plug_compatibility(
pdb_descr_file => '/yxq5/lomon/ODBA_AO_011_011.xml',
pdb_name => 'ODBA_AO_011_011');
IF theResult THEN
DBMS_OUTPUT.PUT_LINE('PDB is compatible');
ELSE
DBMS_OUTPUT.PUT_LINE('PDB is not compatible');
END IF;
END;
/
-- Create Pluggable Database
CREATE PLUGGABLE DATABASE ODBA_AO_011_011 USING '/yxq5/lomon/ODBA_AO_011_011.xml' NOCOPY;
ALTER PLUGGABLE DATABASE ODBA_AO_011_011 open;
SELECT name, con_id FROM v$pdbs WHERE name='ODBA_AO_011_011';
-- Re-create Temporary Tablespace
SELECT property_name, property_value FROM database_properties WHERE property_name LIKE ‘%TEMP%’;
SELECT file_name FROM dba_temp_files;
CREATE TEMPORARY TABLESPACE temp1 TEMPFILE '/u01/app/oracle/oradata/cdb3/datafile/pdb1_temp01.dbf' SIZE 500M AUTOEXTEND ON NEXT 100M MAXSIZE unlimited EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp1;
DROP TEMPORARY TABLESPACE TEMP;
SELECT * FROM PDB_PLUG_IN_VIOLATIONS;
以上是关于Oracle 19c多租户:若只有pdb数据库文件,如何将PDB插入到CDB?的主要内容,如果未能解决你的问题,请参考以下文章
多租户:Oracle Database 19c 中的 DBCA PDB 远程克隆
Oracle 12c 多租户家族(12c 18c 19c)如何在 PDB 中添加 HR 模式