ANKUSH THAVALI
- 03 Sep, 2023
- 0 Comments
- 51 Secs Read
How To Run Expdp In Pluggable Database(PDB)
How To Run Expdp In Pluggable Database(PDB)
In the multitenant database, For getting an export dump from the pluggable database, It is a bit different process.
PLUGGABLE DATABASE(PDB) – PDBPRIM
SCHEMA_NAME – TESTUSER ( this schema/user is present in PDB PDBPRIM)
- Make sure PDB service is registered in the listener.
$ lsnrctl status
2. Add the entry in tnsnames.ora file for the pdb PDBPRIM.
3. Now create a directory for datapump under the PDB.(PDBPRIM)
SQL> show pdbs SQL> alter session set container=PDBPRIM; SQL> create directory PDB_EXPDIR as '/data/backup';
4. Now run the EXPDP:
$ expdp TESTUSER/TESTUSER@PDBPRIM dumpfile=TESTUSER.dmp logfile=TESTUSER.log directory=PDB_EXPDIR SCHEMAS=TESTUSER schemas=TESTUSER