Administering an Oracle RAC-based multitenant container database (CDB) is somewhat similar to administering a non-CDB. The differences are only that some administrative tasks apply to the entire CDB, some apply only to the root, and some apply to specific pluggable databases (PDBs). Administering a pluggable database (PDB) involves a small subset of the tasks required to administer a non-CDB. In this subset of tasks, most are the same for a PDB and a non-CDB. There are some differences, however, such as when you modify the open mode of a PDB. Also, a PDB administrator is limited to managing a single PDB and is not affected by other PDBs in the CDB.
Oracle Database Administrator's Guide for more information about managing CDBs and PDBs
You manage PDBs in an Oracle RAC-based CDB by managing services, regardless of whether the PDBs are policy managed or administrator managed. Assign one dynamic database service to each PDB to coordinate start, stop, and placement of PDBs across instances in a clustered container database.
For example, if you have a CDB called
raccont with a policy-managed PDB called
spark, which is in a server pool called
prod, then assign a service called
plug to this database using the following command:
srvctl add service –db raccont –pdb spark –service plug –serverpool prod
plug will be uniformly managed across all nodes in the server pool. If you want to have this service running as a singleton service in the same server pool, use the
-cardinality singleton parameter with the preceding command.
To open the PDB
spark, you must start the respective service,
plug, as follows:
srvctl start service -db raccont -service plug
To stop the service,
srvctl stop service -db raccont -service plug
spark remains open until you close the PDB using the SQL command
ALTER PLUGGABLE DATABASE
CLOSE IMMEDIATE;. You can check the status of the database using the
srvctl status service command.
Because PDBs are managed using dynamic database services, typical Oracle RAC-based management practices apply. So, if the service
plug is in the ONLINE state when Oracle Clusterware is shut down on a server hosting this service, then the service will be restored to its original state after the restart of Oracle Clusterware on this server. This way, starting PDBs is automated as with any other Oracle RAC database.
Unlike SQL*Plus, SRVCTL operates on a cluster database, as a whole. Starting a PDB using services therefore applies to multiple instances of the clustered CDB at the same time, if the service is defined to run on multiple servers simultaneously, and the current status of the cluster allows for this placement.
Workload Management with Dynamic Database Services for more information about dynamic database services