Home  >  Article  >  Database  >  数据泵expdp中query的使用及注意事项

数据泵expdp中query的使用及注意事项

WBOY
WBOYOriginal
2016-06-07 17:33:581951browse

在用数据泵导出数据的时候,有时候我们需要按条件过滤掉一些不需要导出的数据,这时候就需要用到参数query。下面是一个简单使用q

在用数据泵导出数据的时候,有时候我们需要按条件过滤掉一些不需要导出的数据,这时候就需要用到参数参数的过滤,使的estimate值异常。

 

 

expdp systemparfile=bi_20131203.par

Export: Release11.2.0.3.0 - Production on Tue Dec 3 18:51:04 2013

Copyright (c) 1982,2011, Oracle and/or its affiliates. Allrights reserved.

Password:

Connected to: OracleDatabase 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With thePartitioning, Real Application Clusters, Automatic Storage Management, OLAP,

Data Mining and RealApplication Testing options

Starting"SYSTEM"."SYS_EXPORT_TABLE_01": system/******** parfile=bi_20131203.par

Estimate in progressusing BLOCKS method...

Processing objecttype TABLE_EXPORT/TABLE/TABLE_DATA

Total estimationusing BLOCKS method: 61.75 GB

Processing objecttype TABLE_EXPORT/TABLE/TABLE

Processing objecttype TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT

 

 

查看下参数文件more bi_20131203.par

 

directory=dump_bi

tables=bi_dw.DW_MID_CONTRACT

cluster=n filesize=4G

dumpfile=expdp_bi_ods_tables_20131203_%U.dmp

query=bi_dw.DW_MID_CONTRACT:"where data_date in(to_date('2013-11-13','yyyy-mm-dd'),to_date('2013-11-14','yyyy-mm-dd'),to_date('2013-8-13','yyyy-mm-dd'),to_date('2013-8-14','yyyy-mm-dd'))"

nologfile=y

 

 

Total estimationusing BLOCKS method: 61.75 GB

 

最终,我们导出的文件仅仅只有

 

另外在数据泵导数据的过程中,我们可以expdp system ATTACH=SYS_EXPORT_TABLE_01到该任务。

job的名字可以通过job参数指定,,也可以走默认,dba_datapump_jobs中记载了正在执行的数据泵任务。

select * from dba_datapump_jobs;

SYS_EXPORT_TABLE_01

相关阅读:

GoldenGate不使用数据泵完成Oracle-Oracle的双向复制

使用GoldenGate的数据泵进行Oracle-Oracle的单向复制

如何对 Oracle 数据泵(expdp/impdp) 进行 debug

Oracle 数据库导出数据泵(EXPDP)文件存放的位置

Oracle 10g 数据泵分区表的导出

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn