Oracle 10g enhanced import and export tool expdp/impdp [Linux]

Source: Internet
Author: User

Steps:
1. Create a directory. You must create a directory before importing and exporting the directory.
# Sqlplus/as sysdba
> Create directory dump_dir as '/home/Oracle/dump ';
Note: dump_dir points to the actual physical path/home/oracle/dump, and the/home/oracle/dump directory must exist.
2. Grant the permission to read and write directories to corresponding users.
> Grant read, write on directory dump_dir to bkjia;
3. Export
-- Export the table structure and data under bkjia from the database orcl, excluding the table JK_COMPANY_VIDICON_INFO.
Expdp bkjia/bkjia @ orcl directory = dump_dir dumpfile = test4.dmp nologfile = y exclude = table: \ "in \ (\ 'jk _ COMPANY_VIDICON_INFO \'\)\"
Note: If the expdp parameter is directly written in the command line, you need to add the Escape Character '\' to the exclude value in this example.
* In the par parameter file, no escape character is required. If you add a parameter, an error is returned. The table name must be in uppercase.
-- Export the specified table jk_company_vidicon_info:
Expdp bkjia/bkjia @ orcl directory = dump_dir dumpfile = test5.dmp nologfile = y tables = jk_company_vidicon_info
4. Import
-- Import the objects in bkjia of the original scheme into bkjia. This scheme is not idcfree. Replace the scheme in case of table conflicts
Impdp idcfree/idcfree @ orcl directory = dump_dir dumpfile = test4.dmp nologfile = y schemas = bkjia table_exists_action = replace
-- Import the objects in the original scheme bkjia into the new scheme idcfree
Impdp idcfree/idcfree @ orcl directory = dump_dir dumpfile = test4.dmp nologfile = y remap_schema = bkjia: idcfree

5. Example of using the parameter file *. par
# Vi exp_table.par
DIRECTORY = dump_dir
DUMPFILE = expdp_bkjia.dmp
LOGFILE = expdp_bkjia.log
CONTENT = METADATA_ONLY

# Expdp bkjia/bkjia @ orcl parfile = exp_table.par
------------------------
# Vi exp_evwp.par
Directory = dump_dir
Dumpfile = test3.dmp
Nologfile = y
Exclude = table: "in ('jk _ COMPANY_VIDICON_INFO ')"

# Expdp evwp/evwp @ orcl parfile = exp_evwp.par

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.