Oracle expdp/impdp usage

Source: Internet
Author: User

<! -- [If! SupportLists] --> 1. <! -- [Endif] --> Go to the oracle server AMX currently used, execute

[Oracle @ lnxas4-ce2 ~] $ Sqlplus/nolog

SQL * Plus: Release 10.2.0.1.0-Production on Wed Jan 12 07:18:47 2011

Copyright (c) 1982,200 5, Oracle. All rights reserved.

SQL> connect/as sysdba

Connected.

SQL> create or replace directory bakdir as/home/oracle/bak;

Directory created.

SQL> grant read, write on directory bakdir to qsh05;

Grant succeeded.

SQL> exit
 

/Home/oracle/bak is where to save database dump file, and 'qsh05 'is database username.

<! -- [If! SupportLists] --> 2. <! -- [Endif] --> Make sure/home/oracle/bak is created, then execute

Expdp qsh05/qsh05 dumpfile = qsh05.dmp directory = bakdir include = table
 

'Qsh05/qsh05 'is database username/password, and 'dumpfile' is the file name of database dump file, and 'directory' is the directory name created in step 1, because only need export table, so add 'include = Table '.

<! -- [If! SupportLists] --> 3. <! -- [Endif] --> If the export is successful, the end of log looks like following,

Dump file set for QSH05.SYS _ EXPORT_SCHEMA_01 is:

/Home/oracle/bak/qsh05.dmp

Job "QSH05". "SYS_EXPORT_SCHEMA_01" successfully completed at 07:25:30
 

And go to/home/oracle/bak, there are two files, 'qsh05. dmp 'and 'export. log '.

<! -- [If! SupportLists] --> 4. <! -- [Endif] --> Go to the ORACLE server where the AMX wanted to migrate, and create a new user/password in database.

<! -- [If! SupportLists] --> 5. <! -- [Endif] --> Create a new dir, and create a new directory mapping to this dir as step 1.

<! -- [If! SupportLists] --> 6. <! -- [Endif] --> Copy dump file to the dir created in step 5, then execute

Impdp new_user/new_pass remap_schema = qsh05: new_user dumpfile = qsh05.dmp directory = new_directory include = table
 

<! -- [If! SupportLists] --> 7. <! -- [Endif] --> If the import is successful, the end of log looks like following,

Job "QSH07". "SYS_IMPORT_FULL_01" successfully completed at 17:46:55
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.