expdp query用法

expdp scott/tiger directory=dp tables=t1  schemas=scott dumpfile=t1.dmp logfile=t1.log  query='"where hiredate>to_date('1982-01-02','yyyy-mm-dd')"'

 

C:\Users\Administrator>expdp scott/tiger directory=dp tables=scott.t1   dumpfile=t1.dmp logfile=t1.log  query="where hiredate>'1982-01-02'"

Export: Release 11.2.0.1.0 - Production on 星期一 3月 11 15:42:54 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: 参数值无效
ORA-39035: 已经指定了数据过滤器 SUBQUERY。


说明query写的有问题

正确写法要用\转义引号

C:\Users\Administrator>expdp scott/tiger directory=dp tables=t1   dumpfile=t1.dmp logfile=t1.log  query=t1:\"where hiredate>to_date('1982-01-02','yyyy-mm-dd')\"

Export: Release 11.2.0.1.0 - Production on 星期一 3月 11 16:33:45 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
启动 "SCOTT"."SYS_EXPORT_TABLE_01":  scott/******** directory=dp tables=t1 dumpfile=t1.dmp logfile=t1.log query=t1:"where hiredate>to_date('1982-01-02','yyyy-mm-dd')"
正在使用 BLOCKS 方法进行估计...
处理对象类型 TABLE_EXPORT/TABLE/TABLE_DATA
使用 BLOCKS 方法的总估计: 64 KB
处理对象类型 TABLE_EXPORT/TABLE/TABLE
. . 导出了 "SCOTT"."T1"                                8.304 KB       8 行
已成功加载/卸载了主表 "SCOTT"."SYS_EXPORT_TABLE_01"
******************************************************************************
SCOTT.SYS_EXPORT_TABLE_01 的转储文件集为:
  E:\ORACLE\T1.DMP
作业 "SCOTT"."SYS_EXPORT_TABLE_01" 已于 16:33:59 成功完成


impdp scott/tiger directory=dp remap_table=t1:t2  dumpfile=t1.dmp logfile=t2.log  table_exists_action=replace

 

 

 

多个表时:

QUERY=emp:\"WHERE username in ('aaa','bb')\",taba:\"WHERE rownum<5\"

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值