Starting and Stopping PDBs in Oracle RAC
You can use SRVCTL commands to manage PDBs.
Note:
Starting with Oracle Database 21c, installation of non-CDB Oracle Database architecture is no longer supported.The policy-managed database deployment option is desupported in Oracle AI Database 26ai.
Starting with Oracle Database 21c, PDBs are a resource managed by Oracle Clusterware. Consider a admin-managed CDB called raccont that has a PDB called spark.
Note:
If you attempt to create the service without first creating the PDB, then you will get an error message indicating you must create the PDB resource first.
If the spark PDB was created with cardinality set to 1, or 2, or ALL, then if you create a service named plug for the PDB, the service can use the -cardinality argument, too. If the spark PDB was created without specifying the -cardinality argument, then new services you create for the PDB use the -preferred or -available arguments, not the -cardinality argument.
Because PDBs are managed as an Oracle Clusterware resource, typical Oracle RAC-based management practices apply. For this reason, if the PDB spark has AUTOMATIC management policy, then the PDB is started when CDB starts. Similarly, if the PDB spark is in the online state when Oracle Clusterware is shut down on a server hosting this service and the management policy is set to MANUAL, then the PDB is restored to its original state after the restart of Oracle Clusterware on this server. The default PDB management policy is derived from the management policy of its CDB.
To start a Pluggable Database:
$ srvctl start pdb -db db_name -pdb pdb_name [-startoption start_options]
To start a Pluggable Database on specific nodes:
$ srvctl start pdb -db db_name -pdb pdb_name -node node_list
[-startoption start_options]
To stop a PDB and all its services on all nodes within a database using the IMMEDIATE option:
$ srvctl stop pdb -db db_name -pdb pdb_name -stopoption IMMEDIATE -drain_timeout 0
-stopsvcoption IMMEDIATE
To stop a Pluggable Database on specific nodes:
$ srvctl stop pdb -db db_name -pdb pdb_name -node node_list
[-stopoption stop_options] [-stopsvcoption stop_service_options
[-drain_timeout timeout]
If you do not want the spark PDB to restart when the Oracle RAC database is restarted on all, or on a specific node, use the following command:
srvctl disable pdb -db raccont -pdb spark [-node node_name]
To view the status of the PDB service plug, use the following command:
srvctl status service -db raccont -service plug -verbose
To view the status of the PDB spark, use the following command:
srvctl status pdb -db raccont -pdb spark -detail
To modify the configuration of the PDB, use the following command:
srvctl modify pdb -db db_unique_name -pdb pdb_name
[-cardinality {num_of_instances | ALL}]
[-maxcpu max_cpu_usage] [-mincpuunit min_cpu_usage]
[-rank rank] [-startoption start_options]
[-stopoption stop_options] [-policy policy]
Note:
You can modify the -cardinality parameter only if you had set the -cardinality parameter when creating the PDB.
Related Topics