-
Notifications
You must be signed in to change notification settings - Fork 3
Creating Databases and Pluggable Databases in Containers
Sean Scott edited this page Oct 21, 2020
·
1 revision
There are four environment variables that control how a databases and pluggable databases are created.
-
ORACLE_SID
: Case-sensitive ORACLE_SID. Default is ORCL for non-container databases, ORCLCDB for container databases, and XE for 18c Express Edition. -
PDB_COUNT
: The number of pluggable databases to be created. SettingPDB_COUNT
to 0 creates a non-container database. Ignored in version 11 and whenPDB_LIST
is set. -
ORACLE_PDB
: Case sensitive pluggable database name. Ignored in version 11. IfPDB_COUNT
is 1,ORACLE_PDB
is used for the name of the single pluggable database created in the container database. IfPDB_COUNT
> 1,ORACLE_PDB
is used as the prefix for all pluggable databases created in the container database. Default is XEPDB for 18c Express Edition, ORCLPDB for all others. -
PDB_LIST
: A comma-delimited, case-sensitive list of pluggable databases to be created. Ignored in version 11. Causes a container database to be created and overrides entries inPDB_COUNT
andORACLE_PDB
. Default is not set.
Include -e PDB_COUNT=0
in the docker run
command and leave PDB_LIST
unset.
The default for container-enabled versions is to create a single pluggable database. To specify a name for the PDB, include -e ORACLE_PDB=<NAME>
in the docker run
command.
To create multiple, numbered pluggable databases with the same prefix, include -e ORACLE_PDB=<PREFIX>
and -e PDB_COUNT=<X>
to create pluggable databases with prefix .
To create multiple, custom-named pluggable databases, include -e PDB_LIST="PDB1,PDB2, ... PDBn"
in the docker run
command. The presence of PDB_LIST
overrides settings for PDB_COUNT
and ORACLE_PDB
.