Hi Oracle Guru,
In my test environment, Created two Container Database CDB1 & CDB2 this CDB has below Pluggable Databases
CDB1 has PDB1 and PDB2
CDB2 has PDB2
Now in listener it showing as below
Service "pdb2" has 2 instance(s).
Instance "CDB1", status READY, has 1 handler(s) for this service...
Instance "CDB2", status READY, has 1 handler(s) for this service...
I created below TNS Entry. Now when I am connecting using this TNS once its getting connected to CDB1 PDB2 and another time to CDB2 PDB2
PDB2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = source)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PDB2)
)
)
[oracle@source admin]$ sqlplus system/oracle@pdb2
Connected to:
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
3 PDB2 READ WRITE NO
[oracle@source admin]$ sqlplus system/oracle@pdb2
Connected to:
SQL> show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
4 PDB2 READ WRITE NO
How can I make sure to connect to right PDB here in this scenario.
Thanks & Regards
Jamsher Khan