Connecting to a CDB or PDB
- Connecting to a CDB or PDB is not different of connecting to a standard database.
- When you create a PDB, it is automatically assigned a service which can be used to reach this specific PDB.
- You can either use the EZ connect syntax, the Oracle Net Service syntax or the new : ALTER SESSION SET CONTAINER syntax.
- The CDB_SERVICES view lets you view the services for each PDB.
- The SHOW CON_NAME command can be used to identify the container your are connected to.
Users and administrative tasks
- Only a common user can connect to CDB$ROOT.
- To use the ALTER SESSION SET CONTAINER command, a common user must have the SET CONTAINER privilege.
- All management tasks except PLUG/UNPLUG and STOP/START in a PDB are equivalent to a standard database.
- You can use the CONTAINER=ALL clause in a DDL statement to execute it in all PDBs. This can only be done by a common user with the SET CONTAINER privilege.
- By DEFAULT when you issue a DDL the CONTAINER clause is equal to CURRENT.
- A common user name starts wth C##
Continue reading OCP 12C – Managing CDBs and PDBs →