Dummy 19C Database Script to Create a CDB with PDB$SEED


Below is a minimal, clean, and correct CREATE DATABASE script with custom names for easy reuse.

CREATE DATABASE FINDB01
  USER SYS IDENTIFIED BY manager
  USER SYSTEM IDENTIFIED BY manager
  CONTROLFILE REUSE
  LOGFILE
    GROUP 1 ('+RECO/FNDB01/redo01.log') SIZE 100M,
    GROUP 2 ('+RECO/FNDB01/redo02.log') SIZE 100M,
    GROUP 3 ('+RECO/FNDB01/redo03.log') SIZE 100M
  MAXLOGFILES 10
  MAXLOGMEMBERS 3
  MAXDATAFILES 300
  CHARACTER SET AL32UTF8
  NATIONAL CHARACTER SET AL16UTF16
  EXTENT MANAGEMENT LOCAL
  DATAFILE '+DATA/FNDB01/system01.dbf' SIZE 800M
  SYSAUX DATAFILE '+DATA/FNDB01/sysaux01.dbf' SIZE 600M
  DEFAULT TABLESPACE users
    DATAFILE '+DATA/FNDB01/users01.dbf' SIZE 300M
  DEFAULT TEMPORARY TABLESPACE temp
    TEMPFILE '+DATA/FNDB01/temp01.dbf' SIZE 200M
  UNDO TABLESPACE undotbs1
    DATAFILE '+DATA/FNDB01/undotbs01.dbf' SIZE 400M
  ENABLE PLUGGABLE DATABASE
    SEED
    FILE_NAME_CONVERT = ('+DATA/FNDB01/', '+DATA/FNDB01/pdbseed/');


Important Prerequisite

Before running the CREATE DATABASE command, verify:

SHOW PARAMETER enable_pluggable_database;

Expected value:

enable_pluggable_database = TRUE

Post-Creation Validation

After database creation, confirm the containers:

SELECT name, open_mode FROM v$database; SELECT name, open_mode FROM v$pdbs;

Expected result:

  • CDB$ROOT – READ WRITE

  • PDB$SEED – READ ONLY





Please do like and subscribe to my youtube channel: https://www.youtube.com/@foalabs If you like this post please follow,share and comment