Connecting to Container Database:
As with introduction of Portable databases, during installation you are given option with simple installation of the version or you can opt for Container Database, once you opt for container DB option, it will ask for portable database name:
Once installation/creation of database is completed, login to root container is as simple we login to normal database. i.e
Since service is created now. lets check the tnsnames.ora file :
As now we have services configured for PDB let access the PDB through that service:
If you don't have service configured we can access the container by set container clause:
As with introduction of Portable databases, during installation you are given option with simple installation of the version or you can opt for Container Database, once you opt for container DB option, it will ask for portable database name:
[oracle@18ctestdb ~]$ sqlplus / as sysdba
SQL*Plus: Release 18.0.0.0.0 Production on Tue Mar 13 00:55:06 2018
Version 18.1.0.0.0
Copyright (c) 1982, 2017, Oracle. All rights reserved.
Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.1.0.0.0
SQL>
SQL> sho user
USER is "SYS"
SQL> sho con_name
CON_NAME
------------------------------
CDB$ROOT
SQL>
But Logging in to PDBS is not that simple, as PDBs will be accessible through some create net service:
Let have a look at tnsnames.ora file:
No Service is created against Portable container database, so we should create the service through netca:
Since service is created now. lets check the tnsnames.ora file :
As now we have services configured for PDB let access the PDB through that service:
If you don't have service configured we can access the container by set container clause:


























