An example of oracle impdp and expdp is provided.

Source: Internet
Author: User

An example of oracle impdp and expdp is provided.

Create a test table and insert Test Data

Create table test_tab (id number not null primary key, name varchar2 (20); insert into test_tab values (1, 'Data 1 ');

Create directory object

create or replace directory DMP_DIR  as '/oradata/ebankbak/';

Export the specified table

expdp mia/mia tables=test_tab dumpfile=test.dmp directory=DMP_DIR

Import the specified table

Table_exists_action parameter: skip (skip an object. If the object already exists, skip it and execute the next one), append (append existing table data without affecting the original row ), truncate (delete existing table rows and save all data) and replace (delete existing tables, create new tables, and save data)

impdp mia/mia directory=dmp_dir dumpfile=test.dmp table_exists_action=skip
impdp mia/mia directory=dmp_dir dumpfile=test.dmp table_exists_action=append
impdp mia/mia directory=dmp_dir dumpfile=test.dmp table_exists_action=truncate
impdp mia/mia directory=dmp_dir dumpfile=test.dmp table_exists_action=replace

Import the specified table, modify the table space, and modify the user. Parameter: remap_schema = original user: target user, remap_tablespace = (original table space: target table space). You can use ", "Split, such as (a: B, c: d)

impdp mia/mia DIRECTORY=DMP_DIR dumpfile=test.dmp  logfile=impdp_index.log remap_schema=uibs:mia  remap_tablespace=\(IBSDATA:MIADATA\)

Include (including specified object)/exclude (ignore specified object) parameter description

The parameter is [object_type]: [name_clause], and [object_type]: [name_clause] object_type specifies the object type, such as table, view, procedure, package, sequence, index name_clause specifies the SQL condition (you can leave it unspecified), such as: include = table: "in ('1', '2')", sequence: "= 'myseq '", if no condition is specified, all objects are represented, such as exclude = index.

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.