EXPDP, IMPDP to exclude table and query criteria

Source: Internet
Author: User
Exclude EXPDP/IMPDP from certain tables

EXPDP system/123456 directory=data_pump_dir dumpfile=wf.dmp logfile=wf.log schemas=winwf "EXCLUDE=TABLE:\ (\" TABLE _name1\ ' \) \ "
EXPDP system/123456 directory=data_pump_dir dumpfile=wf.dmp logfile=wf.log schemas=winwf "EXCLUDE=TABLE:\ (\" TABLE _name1\ ', \ ' table_name2\ ', \ ' table_name3\ ' \) \

Example
EXPDP user DH, the user does not have EXPDP permission, tablespace for DH, but excludes ierp_wo_sn_material_info and so on 5 tables, know DH user password, do not know system password, can only use as system to replace
EXPDP \ db/dahai_2013 as sysdba\ "Schemas=dh directory=dumpdir dumpfile=2015dh.dmp exclude=table:\" IN\ (\ ' IERP_WO_SN_ Material_info\ ', \ ' ierp_wo_sn_user\ ', \ ' wip_sn_collection_info\ ', \ ' ierp_error_tracking_info\ ', \ ' COMMON_MAIL_ Notice\ ' \) \ "

IMPDP to a schema-dahai_demo,tablespace-Dahaidata_demo user, the IMPDP import of 2015dh.dmp files for some tables has been excluded, as is the case with normal imports
IMPDP system/mds_ets.2009 Remap_schema=dh:dahai_demo Remap_tablespace=dh:dahaidata_demo dumpfile=2015dh.dmp Directory=dumpdir



Query Criteria EXPDP/IMPDP

Just export a table by query condition and find that you don't need to add schema=, just precede tables= with a schema
EXPDP \ "db/dahai_2013 as Sysdba\" Directory=dumpdir dumpfile=2015table1.dmp tables=dh. Ierp_wo_sn_material_info QUERY=DH. Ierp_wo_sn_material_info:\ "where creation_date\>" ' 23-sep-15 ' "\"

According to the query conditions can also be exported two tables, only to tables= in the comma separated two tables, query= Comma separated from the two tables of the query conditions can
EXPDP \ "db/dahai_2013 as Sysdba\" Directory=dumpdir dumpfile=2015table2.dmp tables=dh. Ierp_wo_sn_user,dh. Wip_sn_collection_info QUERY=DH. Ierp_wo_sn_user:\ "where creation_date\>" ' 23-sep-15 ' "\", DH. Wip_sn_collection_info:\ "where creation_date\>" ' 23-sep-15 ' "\"

Example
Export a server Cux users the following two tables, and then import to the B server Cux users under the same table name, content appended to, tablespace unchanged
EXPDP \ "system/q2o0racl4syst4m as Sysdba\" Directory=odpdir dumpfile=201611182.dmp Tables=cux.cux_msc_woip_supplys, Cux.cux_msc_woip_plans query=cux.cux_msc_woip_supplys:\ "Where request_id = 20852081\", cux.cux_msc_woip_plans:\ " where request_id = 20852081\ "

IMPDP System/manager dumpfile=201611182.dmp Directory=odpdir table_exists_action=append



DMP file by query criteria import, and the same as the general import (plus tables= does not matter)
The following import a table Dh.ierp_wo_sn_material_info contains query conditions DMP file, plus TABLES=DH. Ierp_wo_sn_material_info Normal Import
IMPDP system/mds_ets.2009 Remap_schema=dh:dahai_demo Remap_tablespace=dh:dahaidata_demo dumpfile=2015table1.dmp Directory=dumpdir TABLES=DH. Ierp_wo_sn_material_info

The following import two sheets of DH.IERP_WO_SN_USER,DH. Wip_sn_collection_info contains query conditions DMP file, without tables= discovery can also be imported
IMPDP system/mds_ets.2009 Remap_schema=dh:dahai_demo Remap_tablespace=dh:dahaidata_demo dumpfile=2015table2.dmp Directory=dumpdir

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.