
CREATE pluggable DATABASE "{PDB 이름}" admin USER "{DBA ID}" IDENTIFIED BY "{Password}"
roles=(dba) file_name_convert=('{Source PDB 경로}, '{PDB 생성 경로});
-- 예제
CREATE pluggable DATABASE "homelab" admin USER "pdbadmin" IDENTIFIED BY "j&u&Q*hz#@CRZ3"
roles=(dba) file_name_convert=('/opt/oracle/oradata/XE/pdbseed', '/opt/oracle/oradata/XE/homelab');
실행 결과
oracle-21-xe | CREATE pluggable DATABASE "homelab" admin USER "pdbadmin" IDENTIFIED BY *
oracle-21-xe | roles=(dba) file_name_convert=('/opt/oracle/oradata/XE/pdbseed', '/opt/oracle/oradata/XE/homelab')
oracle-21-xe | 2023-04-25T12:47:53.418228+00:00
oracle-21-xe | PDB$SEED(2): AUDSYS.AUD$UNIFIED (SQL_TEXT) - CLOB populated
oracle-21-xe | 2023-04-25T12:48:00.479970+00:00
oracle-21-xe | HOMELAB(4):Endian type of dictionary set to little
oracle-21-xe | ****************************************************************
oracle-21-xe | Pluggable Database HOMELAB with pdb id - 4 is created as UNUSABLE.
oracle-21-xe | If any errors are encountered before the pdb is marked as NEW,
oracle-21-xe | then the pdb must be dropped
oracle-21-xe | local undo-1, localundoscn-0x0000000000000121
oracle-21-xe | ****************************************************************
oracle-21-xe | HOMELAB(4):Pluggable database HOMELAB pseudo opening
oracle-21-xe | HOMELAB(4):SUPLOG: Initialize PDB SUPLOG SGA, old value 0x0, new value 0x18
oracle-21-xe | HOMELAB(4):Autotune of undo retention is turned on.
oracle-21-xe | HOMELAB(4):Undo initialization recovery: Parallel FPTR complete: start:2784005433 end:2784005434 diff:1 ms (0.0 seconds)
oracle-21-xe | HOMELAB(4):Undo initialization recovery: err:0 start: 2784005432 end: 2784005434 diff: 2 ms (0.0 seconds)
oracle-21-xe | HOMELAB(4):[43113] Successfully onlined Undo Tablespace 2.
oracle-21-xe | HOMELAB(4):Undo initialization online undo segments: err:0 start: 2784005435 end: 2784005501 diff: 66 ms (0.1 seconds)
oracle-21-xe | HOMELAB(4):Undo initialization finished serial:0 start:2784005432 end:2784005505 diff:73 ms (0.1 seconds)
oracle-21-xe | HOMELAB(4):Database Characterset for HOMELAB is AL32UTF8
oracle-21-xe | HOMELAB(4):Pluggable database HOMELAB pseudo closing
oracle-21-xe | HOMELAB(4):JIT: pid 43113 requesting stop
oracle-21-xe | HOMELAB(4):Closing sequence subsystem (7078972854992).
oracle-21-xe | HOMELAB(4):Buffer Cache flush started: 4
oracle-21-xe | HOMELAB(4):Buffer Cache flush finished: 4
oracle-21-xe | Completed: CREATE pluggable DATABASE "homelab" admin USER "pdbadmin" IDENTIFIED BY *
oracle-21-xe | roles=(dba) file_name_convert=('/opt/oracle/oradata/XE/pdbseed', '/opt/oracle/oradata/XE/homelab')
SELECT * FROM V$PDBS;

PDB가 생성 되었고, open_mode 가 mounted 로 된 것 확인
ALTER pluggable DATABASE homelab OPEN READ WRITE;
SELECT * FROM V$PDBS;
