In an Oracle Multitenant configuration, the SID_NAME in a Pluggable Database (PDB) setup differs from traditional standalone databases. Here’s how it works in general:

1. Understanding SID_NAME in a PDB Setup
- The SID_NAME in listener.ora is always associated with the Container Database (CDB), not individual PDBs.
- Pluggable Databases (PDBs) do not have a unique SID. Instead, they are accessed via a service name.
2. Typical listener.ora for a Multitenant Database
Example listener.ora configuration for a CDB with PDBs:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = westdb)(PORT = 1521))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = west.alexlima.com)
(ORACLE_HOME = /u01/app/oracle/product/19c/dbhome_1)
(SID_NAME = west) # Always refers to the CDB
)
)
- SID_NAME = west → This is the Container Database (CDB) SID.
- PDBs do not have a SID in listener.ora but are accessed via service names.
3. How to Connect to a PDB
To connect to a specific Pluggable Database (PDB), you need its service name, not a SID.
Find the PDB Service Name
Log into SQL*Plus as SYSDBA and run:
SHOW PARAMETER service_names;
or:
SELECT name, pdb, con_id FROM v$services;
Example Output
NAME PDB CON_ID
------------ ---------- ------
CDB$ROOT CDB$ROOT 1
PDB1_SVC PDB1 3
PDB2_SVC PDB2 4
- The CDB SID is west.
- The PDBs are accessed via PDB1_SVC, PDB2_SVC, etc.
TNS Entry for a PDB
If using a tnsnames.ora file:
PDB1_CONN =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = westdb)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = PDB1_SVC)
)
)
To connect:
sqlplus user/password@PDB1_CONN
4. Dynamic Registration of PDB Services
Oracle automatically registers PDB services with the listener when the database starts. You can force registration manually:
ALTER SYSTEM REGISTER;
If the PDB service is missing in lsnrctl status, check:
SELECT name FROM dba_services WHERE pdb = 'PDB1';
If necessary, manually add a service:
exec DBMS_SERVICE.CREATE_SERVICE('NEW_PDB_SVC', 'NEW_PDB_SVC');
ALTER SYSTEM SET SERVICE_NAMES='NEW_PDB_SVC' SID='*' SCOPE=BOTH;
5. Summary
| Component | Identified By | Example |
|---|---|---|
| CDB (Container Database) | SID_NAME in listener.ora | west |
| PDB (Pluggable Database) | SERVICE_NAME | PDB1_SVC, PDB2_SVC |
| Connection to PDB | Use SERVICE_NAME | sqlplus user/password@westdb:1521/PDB1_SVC |
Key Takeaways
- CDB has a SID, but PDBs use service names.
- PDBs are not listed in listener.ora; they register dynamically.
- Use SHOW PARAMETER service_names; to check PDB service names.
About Pluggable Databases
https://docs.oracle.com/en/cloud/paas/base-database/about-pdb/index.html

Leave a comment