Oracle10g enhanced import and export tool expdp/impdp [Linux]

Source: Internet
Author: User
1. Create a directory. Before importing and exporting data, you must first create directory # sqlplusassysdbagt; createdirectorydump_diras

1. create a directory. Before importing and exporting data, you must first create directory # sqlplus/as sysdbagt; create directory dump_dir

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 linuxidc;
3. Export
-- Export the table structure and data under the linuxidc user from the database orcl, excluding the table JK_COMPANY_VIDICON_INFO.
Expdp linuxidc/linuxidc @ 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 linuxidc/linuxidc @ orcl directory = dump_dir dumpfile = test5.dmp nologfile = y tables = jk_company_vidicon_info
4. Import
-- Import the objects in the original linuxidc solution to the linuxidc solution. Instead of idcfree, replace the objects in the original solution when table conflicts exist.
Impdp idcfree/idcfree @ orcl directory = dump_dir dumpfile = test4.dmp nologfile = y schemas = linuxidc table_exists_action = replace
-- Import objects in the original solution linuxidc to the new solution idcfree
Impdp idcfree/idcfree @ orcl directory = dump_dir dumpfile = test4.dmp nologfile = y remap_schema = linuxidc: idcfree

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

# Expdp linuxidc/linuxidc @ 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

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.