1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Duplicating a database using expdp/impdp

Discussion in 'Security, Backup and Recovery' started by gringo, May 20, 2012.

  1. gringo

    gringo Active Member

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    55
    Hello,

    Hopefully this is a good place to post and, also, asking for step-by-step instructions will not be considered inappropriate...

    My problem is the following:

    I have a full export of an Oracle 10g database, taken with expdp.
    I installed Oracle, the same version, on a second machine.
    I want to duplicate the database from the first machine to the second one using the impdp command and the (full=Y) expdp dump file.

    Can anyone help me with a step-by-step tutorial?
     
  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    You did the expdp of the source database? Hopefully you did this as SYS. The task is fairly easy -- transfer the dump file to the destination server and invoke impdp and import the file full=y. I'm confused that you're asking how to do an import when you clearly created the export. Am I missing something here?
     
  3. gringo

    gringo Active Member

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    55
    Tks. for your reply.

    1. Yes, the expdp was as SYS. Why is it so important?

    2. No, I think you are not missing anything :)

    My doubts were regarding, possibly, other operations needed:

    Do I need to create the tablespaces as in the source database? Do I need to create some users? The Oracle 10g on the second machine needs other tweaks (parameters or smth. else)? For the moment Oracle is installed and a database is created using dbca.

    I am an absolute beginner and there are a lot of Oracle concepts that I need to become familiar with, that's why I'd rather need a thorough tutorial regarding this pseudo-cloning operation...
     
  4. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    You shouldn't need to create the tablespaces IF the underlying directory structure on the destination server is the same as the source server. IF it isn't then you will need to manually create the tablespaces or use the remap_datafile option to impdp. You will probably need to create a new directory pointing to the location of the copied dump file. It's important to do a full export/import as SYS so you won't likely have to do anything manually. The users should also be created PROVIDED there are no errors when the import is creating the tablespaces. Missing tablespaces can cause user accounts associated with them (as default tablespaces) to fail. If you have no idea of what you're doing with impdp there is too much to discuss to do it here. You should start reading the online documentation on impdp:

    http://docs.oracle.com/cd/E11882_01/server.112/e22490/dp_import.htm#i1010670

    Read it CAREFULLY as there is much to do when copying database schemas using expdp/impdp. Possibly you should find someone local to you who has done this before.
     
  5. gringo

    gringo Active Member

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    55
    tks. for your answers. i will try the procedure and I will come back with question when/if needed.