Expdp&impdp

Source: Internet
Author: User

1 Create a logical folder that does not create a real folder in the operating system, preferably created by an administrator such as system.
Create directory dpdata1 as '/opt/oracle/dpdata1 ';
Create directory Expdata as '/ora_arch/expdata ';

2 View the Management Manager folder (see if the operating system exists at the same time, because Oracle does not care if the folder exists, if it does not exist, then an error occurs)
SELECT * from Dba_directories;

3 gives the Scott user permission to operate on the specified folder, preferably given by an administrator such as system.
Grant Read,write on directory Expdata to Ardb;

4 Exporting data
1) According to the user guide
EXPDP billingcdrdb/[email protected]Schemas=billingcdrdb dumpfile=prodbillingcdrdb.dmp directory=dpdata1 Logfile=prodbillingcdrdb.log;
EXPDP billingcdrdb/[email protected]Schemas=billingcdrdb dumpfile=prodbillingcdrdb.dmp Directory=dumpdir content=metadata_only logfile= Prodbillingcdrdb.log;
2) Parallel Process parallel
EXPDP scott/[email protected]Directory=dpdata1 dumpfile=scott3.dmp parallel=40 Job_name=scott3
3) According to the table name guide
EXPDP Ardb/ardb tables=log_trx_detail dumpfile=log_trx_detail.dmp directory=expdata;
4) Guided by query criteria
EXPDP scott/[email protected]Directory=dpdata1 dumpfile=expdp.dmp tables=emp query= ' WHERE deptno=20 ';
5) According to the Table space Guide
EXPDP System/manager directory=dpdata1 dumpfile=tablespace.dmp tablespaces=temp,example;
6) Guide the entire database
EXPDP System/manager directory=dpdata1 dumpfile=full.dmp full=y;

5 Restoring data
1) leads to the specified user
IMPDP Scott/tiger directory=dpdata1 dumpfile=expdp.dmp Schemas=scott;
2) Change the owner of the table
IMPDP system/manager directory=dpdata1 dumpfile=expdp.dmp tables=scott.dept remap_schema=scott:system;
3) Import Table space
IMPDP System/manager directory=dpdata1 dumpfile=tablespace.dmp tablespaces=example;
4) Import the database
impdb System/manager directory=dump_dir dumpfile=full.dmp full=y;
5) Append Data
IMPDP system/manager directory=dpdata1 dumpfile=expdp.dmp schemas=system table_exists_action

Drop user Algeria cascade;
Create user Algeria identified by Algeria default tablespace Algeria;
Grant Connect, resource to Algeria;
Grant create synonym, create view to Algeria;
Create directory Algeria as ' D:\algeria ';
IMPDP billingcdrdb1/billingcdrdb1 directory=dpdata1 dumpfile=prodbillingcdrdb.dmp Remap_schema=billingcdrdb: BILLINGCDRDB1 Logfile=impdp.log

Expdp&impdp

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.