Skip to content

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

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.

Adding sys user for Oracle DB

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

  1. Log in to Oracle Database: Find all possible service names within the Oracle environment.

    setting up CDB$ROOT in Oracle DB

  2. 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 to pdb1.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.

Illustration of how SYSDBA access Oracle DB


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.