Forum Stats

  • 3,854,206 Users
  • 2,264,340 Discussions


Specifying the container to connect to from command line utilities (sqlplus/expdp etc)

Richard Harrison .
Richard Harrison . Member Posts: 2,065 Gold Trophy
edited Jul 23, 2013 11:36AM in Multitenant


To kick off this forum I've been playing around with 12c multitenant/pluggable features and I've a general question about connections to the container database - it seems from everything i tried so far (and everything I've read) that there is no way to connect to a container database without going through a sqlnet connection. For example:


sqlplus username/password -- this can only connect to the container database? (once you are in you can alter session to switch to the plugable database but can;t do it directly in the connection)

to connect to a plugged in database you always have to go through sqlnet

sqlpus username/[email protected]

there is no option to say something like:

export ORACLE_SID=container

export ORACLE_CONTAINER=pluggable

and then do sqlplus username/password ?

or some extra command line switch like

export ORACLE_SID=container

sqlplus -container=pluggable username/password

Is that understanding correct or have i missed something in the documentation?



Best Answer

  • OracleMultitenant
    OracleMultitenant Member Posts: 2
    Answer ✓

    Hello Richard,

    In Oracle Multitenant the only way to connect to a PDB is by specifying a service.

    However, there is a shortcut that you can use - TWO_TASK, which you will find documented elsewhere.

    This allows you to specify the default service to be used - think of it as being appended silently to your username/password specification. I hope this helps.

    Regards, Patrick


This discussion has been closed.