title: How to determine the Schemas inside an Oracle Data Pump Export file
body: <ul>
  <li>I have an Oracle database backup file (.dmp) that was created with <code>expdp</code>.</li>
  <li>The .dmp file was an export of an entire database.</li>
  <li>I need to restore 1 of the schemas from within this dump file.</li>
  <li>I don't know the names of the schemas inside this dump file.</li>
  <li>To use <code>impdp</code> to import the data I need the name of the schema to load.</li>
  </ul>
  <p>So, I need to inspect the .dmp file and list all of the schemas in it, how do I do that?</p>
  <hr />
  <p><em>Update (2008-09-18 13:02) - More detailed information:</em></p>
  <p>The impdp command i'm current using is:</p>
  <pre><code>impdp user/password@database directory=DPUMP_DIR 
        dumpfile=EXPORT.DMP logfile=IMPORT.LOG  
  </code></pre>
  <p>And the DPUMP_DIR is correctly configured.</p>
  <pre><code>SQL&gt; SELECT directory_path
  2  FROM dba_directories
  3  WHERE directory_name = 'DPUMP_DIR';
  
  DIRECTORY_PATH
  -------------------------
  D:\directory_path\dpump_dir\
  </code></pre>
  <p>And yes, the EXPORT.DMP file is in fact in that folder.</p>
  <p>The error message I get when I run the <code>impdp</code> command is:</p>
  <pre><code>Connected to: Oracle Database 10g Enterprise Edition ...
  ORA-31655: no data or metadata objects selected for the job
  ORA-39154: Objects from foreign schemas have been removed from import
  </code></pre>
  <p>This error message is mostly expected. I need the <code>impdp</code> command be:</p>
  <pre><code>impdp user/password@database directory=DPUMP_DIR dumpfile=EXPORT.DMP 
        SCHEMAS=SOURCE_SCHEMA REMAP_SCHEMA=SOURCE_SCHEMA:MY_SCHEMA
  </code></pre>
  <p>But to do that, I need the source schema.</p>