title: Oracle: importing data pump dump without knowledge dump file content
body: <p>Old approach for exporting/importing whole schema:</p>
  
  <pre><code> exp user/pwdp@server FILE=export.dmp OWNER=user ROWS=Y
   imp newuser/pwd@server FULL=Y FILE=export.dmp
  </code></pre>
  
  <p>New approach:</p>
  
  <pre><code> expdp user/pwdp@server DUMPFILE=export.dp DIRECTORY=exportfolder 
  </code></pre>
  
  <p>However had a problem with importing:</p>
  
  <pre><code> impdp newuser/pwdp@server DUMPFILE=export.dp DIRECTORY=exportfolder
  </code></pre>
  
  <p>will not import anything:</p>
  
  <pre><code>Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
  With the Partitioning, OLAP, Data Mining and Real Application Testing options
  ORA-31655: no data or metadata objects selected for job
  ORA-39154: Objects from foreign schemas have been removed from import
  Master table "NEWUSER"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
  Starting "NEWUSER"."SYS_IMPORT_FULL_01":  newuser/********@server
  DUMPFILE=export.dp DIRECTORY=exportfolder
  Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
  Job "NEWUSER"."SYS_IMPORT_FULL_01" successfully completed at 19:13:04
  </code></pre>
  
  <p>Adding schemas option will not help (result is same, oracle does not allow import non-owned objects):</p>
  
  <pre><code>impdp newuser/pwdp@server DUMPFILE=export.dp DIRECTORY=exportfolder schemas=user
  </code></pre>
  
  <p>And only one working approach which I found:</p>
  
  <pre><code>impdp newuser/pwdp@server DUMPFILE=export.dp DIRECTORY=exportfolder remap_schema=newuser:user
  </code></pre>
  
  <p>So the question is how to import schema data pump dump without knowledge which schema was exported?</p>
  
  <p>(Of course I can look to first 512 bytes of export file and find string like "USER"."SYS_EXPORT_SCHEMA_01"), but may be exists another approach?</p>