Example of Creating a Pluggable Database with Cardinality and Rank

You can use these examples to see how to create an Oracle AI Database and create a Pluggable Database, specifying cardinality, in the Oracle AI Database.

You can define relative importance of Pluggable Databases in an Oracle AI Database using the -rank parameter. This option works for the Pluggable Databases that are created specifying cardinality in a database with the RANK management policy.

The following examples show you how to create an Oracle AI Database with the RANK management policy, add a Pluggable Database in the Oracle AI Database specifying cardinality, and modify the PDB cardinality.

Example: Creating an Oracle AI Database Using SRVCTL

In this example, you create an Oracle AI Database DATA with the RANK management policy using SRVCTL:

$ srvctl add database -db db_unique_name -policy RANK -oraclehome $ORACLE_HOME -dbname DATA

Example: Creating a Pluggable Database Using SRVCTL

In this example, you create a Pluggable Database MYPDB, specifying cardinality, in Oracle AI Database DATA using SRVCTL:

$ srvctl add pdb -db DATA -pdb MYPDB -cardinality 2

Note:

If you set the management policy of your CDB to RANK, then the default policy of your PDBs that you create in that CDB will be set to RESTART.

Example: Checking PDB Configuration Using SRVCTL

In this example, you check configuration of Pluggable Database MYPDB using SRVCTL:

$ srvctl config pdb -db DATA -pdb MYPDB
Pluggable database name: MYPDB
Application Root PDB:
Cardinality: 2
Maximum CPU count (whole CPUs): 0
Minimum CPU count unit (1/100 CPU count): 0
Start Option: open
Stop Option: immediate

Example: Modifying Pluggable Database Cardinality and Rank Using SRVCTL

In this example, as the grid user, you modify cardinality of Pluggable Database MYPDB, and set maximum CPU usage, minimum CPU usage, and rank using SRVCTL:

$ srvctl modify pdb -db DATA -pdb MYPDB -cardinality 1 -maxcpu 3 -mincpuunit 20 -rank 2