exp/expdp中query参数的使用
来源:互联网 发布:深入浅出软件开发 编辑:程序博客网 时间:2024/05/21 11:25
之前一直无法搞清楚exp/expdp中关于query参数的正确写法,每次都是零散的印象,这次特意把这个记录成日志以方便以后查看。关于query参数的写法请参看以下两个例子:
1.使用命令行:
expdp t1/t1 directory=tl dumpfile=t2.dmp tables=t query="'where name=''a1'''"
Export: Release 10.2.0.4.0 - 64bit Production on Thursday, 23 February, 2012 16:27:41
Copyright (c) 2003, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "T1"."SYS_EXPORT_TABLE_01": t1/******** directory=tl dumpfile=t2.dmp tables=t query='where name=''a1'''
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
. . exported "T1"."T" 5.234 KB 1 rows
Master table "T1"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for T1.SYS_EXPORT_TABLE_01 is:
/home/oracle/tl/t2.dmp
Job "T1"."SYS_EXPORT_TABLE_01" successfully completed at 16:27:46
2.使用参数文件:
cat par.txt
userid=t1/t1
file=t1.dmp
log=tl.log
tables=t
query='where name=''a1'''
[oracle@host101] ~/tl 1005>exp parfile=par.txt
Export: Release 10.2.0.4.0 - Production on Thu Feb 23 16:44:13 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table T 1 rows exported
Export terminated successfully without warnings.
总结:如果在命令行中使用query,那么其中的条件需要用外层"加内层'组成,如果条件中有字符串,则字符串中的'号变成'';如果是将query写到参数文件中则只需要一层'即可,同样字符串中的'转换为''。
- exp/expdp中query参数的使用
- exp 中query参数的使用
- exp和expdp的使用
- exp query 参数的格式
- 数据泵expdp中query的使用及注意事项
- exp中query的使用方法
- sqlldr,EXP,IMP,EXPDP,IMPDP的使用
- 在exp中使用QUERY选项的范例
- expdp query及parfile的使用
- exp参数中的query参数
- oracle exp query使用解决-LRM-00101: 未知的参数名
- expdp query的用法
- oracle中exp/imp和expdp/impdp的区别
- expdp/impdp和 exp/imp 中设置字符集的问题
- expdp/impdp及exp/imp的使用及区别
- Exp, expdp
- expdp/EXP
- expdp expdp/impdp中 exclude/include 的使用
- nodejs系列提纲
- ASP.NET状态管理(视图状态ViewState)
- 第二章:黑客与画家
- 关于 eclipse的一切
- [python]基于BeautifulSoup解析百度贴吧water_maker(谁最水)的脚本,练手打趣之作[更新0.3]
- exp/expdp中query参数的使用
- 编写程序强制用户通过SSL访问网站
- A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be avail
- c2-3-main-frm_10255-10300渲染日志
- Ubuntu 下常用网站连接地址说明
- 在win7环境下利用cuteftp无法登陆Linux的解决办法
- 位图排序
- Project——多线程断点续传下载
- 通过动态方法处理多个提交请求