전체 글 (661) 썸네일형 리스트형 50 - [Oracle 19C] Cloning PDBs Cloning is copying a source PDB from a CDB and plugging the copy into the same CDB or another CDB Must be connected to a CDB and the current container must be the root Must have the CREATE PLUGGABLE DATABASE system privilege The CDB in which the PBD is being created must be in READ WRITE mode option) It is better you can put the PDB being cloned into READ ONLY mode before you can clone it SQL> s.. 49 - [Oracle 19C] Dropping PDB using DBCA # before SQL> show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 ORCLPDB READ WRITE NO 4 PDB1 READ WRITE NO 5 PDB3 READ WRITE NO # after SQL> show pdbs; CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 ORCLPDB READ WRITE NO 4 PDB1 RE.. 48 - [Oracle 19C] Dropping PDB using SQL SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 ORCLPDB READ WRITE NO 4 PDB1 READ WRITE NO 5 PDB2 READ WRITE NO SQL> drop pluggable database pdb2 including datafiles; drop pluggable database pdb2 including datafiles * ERROR at line 1: ORA-65025: Pluggable database PDB2 is not closed on all instances. SQ.. 47 - [Oracle 19C] To create PDB from seed PBD(DBCA) # to create tablespace manually if you did not choose the default user tablespace CREATE TABLESPACE pdb2 DATAFILE '/u01/app/oracle/oradata/ORCL/pdb2/pdb2_01.dbf' SIZE 1M AUTOEXTEND ON NEXT 1M; ALTER TABLESPACE pdb2 ADD DATAFILE '/u01/app/oracle/oradata/ORCL/pdb2/pdb2_02.dbf' SIZE 1M AUTOEXTEND ON NEXT 1M; SQL> select name, open_mode from v$pdbs; NAME OPEN_MODE -------------------- ---------- PDB.. 46 - [Oracle 19C] Connecting to the new PDB SQL> show con_name CON_NAME ------------------------------ CDB$ROOT SQL> col name format a20 SQL> select name, open_mode from v$pdbs; NAME OPEN_MODE -------------------- ---------- PDB$SEED READ ONLY ORCLPDB READ WRITE PDB1 READ WRITE SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 2 PDB$SEED READ ONLY NO 3 ORCLPDB READ WRITE NO.. 45 - [Oracle 19C] To create PDB from seed PBD We do this by create pluggable database statement. This will copy data files from seed to new location. This will create system and sysaux tablespaces. This will create default schemas and common users . Sys user will be super user. system user can manage the PDB. This will create the DB service automatically. What is the prerequisites for using create pluggable database statement?.. 44 - [Oracle 19C] V$SPPARAMETER # shutdown immediate; [oracle@test dbs]$ ls -ltr 합계 28 -rw-r--r-- 1 oracle oinstall 3079 5월 14 2015 init.ora -rw-r----- 1 oracle oinstall 24 11월 11 01:00 lkORCL -rw-r----- 1 oracle oinstall 2048 11월 14 16:58 orapworcl -rw-r--r-- 1 oracle oinstall 1035 11월 22 11:37 initorcl.ora -rw-r--r-- 1 oracle oinstall 1054 11월 22 13:14 test.ora -rw-r----- 1 oracle oinstall 3584 11월 24 11:21 spfileorcl.ora -r.. 43 - [Oracle 19C] Enable DDL logging SQL> show con_name CON_NAME ------------------------------ CDB$ROOT SQL> alter session set container=orclpdb; Session altered. SQL> show pdbs CON_ID CON_NAME OPEN MODE RESTRICTED ---------- ------------------------------ ---------- ---------- 3 ORCLPDB READ WRITE NO SQL> show con_name CON_NAME ------------------------------ ORCLPDB SQL> show parameter ddl; NAME TYPE VALUE -----------------------.. 이전 1 ··· 22 23 24 25 26 27 28 ··· 83 다음