In the multitenant database, For getting an export dump from the pluggable database, we need a follow a bit different process.

DEMO:

PLUGGABLE DATABASE(PDB) – PRE1
SCHEMA_NAME – DBACLASS ( this schema/user is present in PDB PRE1)

1. Make sure PDB service is registered in the listener.

2. Add the entry in tnsnames.ora file for the pdb PRE1.

cat $ORACLE_HOME/network/admin/tnsnames.ora

3. Now create a directory for datapump under the PDB.(pre1)

4. Now run the EXPDP:

$ expdp DBACLASS/DBACLASS@pre1 dumpfile=dbaclass.dmp logfile=dbaclass.log directory=PDB_EXPDIR SCHEMAS=DBACLASS schemas=DBACLASS

We have successfully ran expdp in pluggable database. Similarly for import only we can follow same steps.