Database Reference
In-Depth Information
Services
CDB
Instance
with SGA
on RAC
Node
CDB Instance
CDB Instance
CDB Instance
pdb1
pdb3
pdb1
pdb2
pdb3
pdb3
pdb4
12c GI
12c RAC
12c GI
12c RAC
12c GI
12c RAC
Node2
Node1
Node3
Root (CDB$ROOT)
CDB With PDBs
Seed
pdb1
pdb2
pdb3
pdb4
Figure 4-10. Oracle RAC-based CDB
Creating Services Associated with PDBs
PDBs in a RAC-based CDB should be managed through the database services. The default database service with
the same name as the PDB is created automatically during PDB creation. You should only use this default service
to connect to the PDB for administrative tasks. For applications to access the PDB, you need to create user-defined
services for the PDB. In Oracle 12c, the database service has an optional PDB property which allows you to create a
database service that is associated with a PDB. For example, we can create two database services, hr1 and sales1, to be
associated with the pdb1 PDB with this command:
$srvctl add service -db cpdb -service hr1 -pdb pdb1 -preferred cpdb1
-available cpdb2
$srvctl add service -db cpdb -service sales1 -pdb pdb1 -preferred cpdb2
-available cpdb3
Notice that these services have two different preferred RAC instances: cpdb1 on node1 and cpdb2 on node2.
Figure 4-10 shows the different database services associated with four PDBs: pdb1, pdb2, pdb3, and pdb4.
The Data Dictionary view all_services lists all the services associated with the CDB and the PDBs:
List the services with the CDB root:
SQL> connect sys@CPDB as sysdba
SQL> select NAME, PDB from all_services;
NAME PDB
----------- ------------------
SYS$BACKGROUND CDB$ROOT
SYS$USERS CDB$ROOT
cpdbXDB CDB$ROOT
cpdb.kcloud.dblab.com CDB$ROOT
 
Search WWH ::




Custom Search