日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

exp/expdp中query参数的使用

發(fā)布時間:2024/8/26 编程问答 44 豆豆
生活随笔 收集整理的這篇文章主要介紹了 exp/expdp中query参数的使用 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

之前一直無法搞清楚exp/expdp中關(guān)于query參數(shù)的正確寫法,每次都是零散的印象,這次特意把這個記錄成日志以方便以后查看。關(guān)于query參數(shù)的寫法請參看以下兩個例子:
???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.使用參數(shù)文件:
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.

總結(jié):如果在命令行中使用query,那么其中的條件需要用外層"加內(nèi)層'組成,如果條件中有字符串,則字符串中的'號變成'';如果是將query寫到參數(shù)文件中則只需要一層'即可,同樣字符串中的'轉(zhuǎn)換為''。


總結(jié)

以上是生活随笔為你收集整理的exp/expdp中query参数的使用的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。