Search code examples
oracleoracle11gdatabase-migrationimpdp

Migrating Oracle Database with expdp and impdp


Does the target database need to be prepared with tablespace and/or user (schema) in order to successfully migrate a schema from one database (11g R1) to another (11g R2)?

Currently I only can make tests with the 11g R1 database. My test was to export a schema and import it into a new schema within the same database.

expdp system/systempass schemas=oldschema

After that I tried to import it with:

impdp system/systempass expdat.dmp remap_schema=oldschema:newschema

But this leads to the error:

UDI-00014: invalid value for parameter, 'attach'
  1. Does this error tell me that newschema is not defined?
  2. Do I have to create a new user?
  3. Do I have to create a tablespace for such a new user?

The questions also relate to a new installed 11g R2 database on a new PC. Any suggestions migrating a database to a fresh installed database are welcome!


Solution

  • "Does the target database need to be prepared with tablespace and/or user (schema) in order to successfully migrate a schema from one database (11g R1) to another (11g R2)?"

    Tablespaces - yes. Users - no.


    UDI-00014: invalid value for parameter, 'attach'
    

    I think the order of parameters is incorrect when calling impdp. Should be of the form:

    impdp username/password DUMPFILE=<filename> [and then whatever other parameters you need for your import]
    

    Since you're doing a "migration" I assume it's a full imp/exp, in which case you probably want:

    impdp username/password DUMPFILE=<filename> FULL=Y
    

    With regard to your current test within the same db, I suggest you check-out:

    http://psoug.org/reference/datapump.html

    for a couple of examples