How to find CDB$ROOT in Oracle
In an Oracle multi-tenant environment, there are CDBs (Container Databases) and PDBs (Pluggable Databases).
Hierarchy Example:
- CDB
- CDB$ROOT
- Customer1PDB
- Customer2PDB
- PDB1
- PDBORCL
- CDB$ROOT
A CDB contains several PDBs. To inventory Oracle databases efficiently in vScope, it’s recommended to connect using a single credential targeting the CDB$ROOT. This enables vScope to access all connected PDBs without needing separate credentials for each one.
Requirements
To connect to CDB$ROOT, the credential should have SYSDBA permissions. In the example below, the system user sys
is assigned SYSDBA privileges.
In this setup, we connect to the service orc.isl.local
(example name). This service is linked to CDB$ROOT, granting access to all PDBs attached to the root.
Steps to Find Service Names for Connection
-
Log in to Oracle Database: Find all possible service names within the Oracle environment.
-
Select the Root Service: Choose the service connected to CDB$ROOT (e.g.,
orc.isl.local
). Connecting to CDB$ROOT through SYSDBA permissions allows access to all connected PDBs. If, for example, you connect topdb1.ISL.local
, only data under PDB1 will be accessible.
Visual Guide
If you target CDB$ROOT with a SYSDBA-privileged credential, you gain access to all PDBs within the root container.
By targeting the root with SYSDBA, vScope can efficiently inventory all connected databases in a multi-tenant environment without needing separate connections to each PDB.