I have create oracle 12c instance with 2 PDBs, I am able to connect to CDB from python using cx_Oracle module but not sure how to connect to PDB.
How to access oracle PDB remotely
oracleoracle-12cpython
Related Question
- “Credential retrieval failed” during recovery of an Oracle database
- Oracle RMAN – How to Move PDB to a New Host
- Oracle – Grant Execution Rights on DBMS Packages to PDB User
- Oracle 12c Multitenant PDB – Managing ARCHIVELOG
- Oracle: Save PDB state for all instances in RAC environment
- How to be specific about which CDB I want to connect to wrapping a PDB
- Oracle – PDB Broken After Upgrade from 12.1 to 12.2
- Oracle 12c – Resolving PDB Issues on Linux
Best Answer
My environment (18c XE docker):
You will find the corresponding SERVICE_NAME for PDBS by:
You may define the SERVICE_NAME the way you want for your PDB. It is a good practice to name your database service. You can also configure your database to expose multiple SERVICE_NAMEs for the same database. For example at a TV station you have multiple channels. Their content is different so they go into separate schemas (CNN_NATIONAL, CNN_INTERNATIONAL).
The point is you only need ONE Oracle Database to serve multiple applications separated by schemas. Now that we have containers we can have even better isolation/separation.
sys@XE> @g XEPDB1