- 論壇徽章:
- 7
|
在以前的iqunload里, iqunload只能用于migration mode (-au) 或 schema unload mode (-n). 現(xiàn)在, iqunload有了個(gè)加強(qiáng)補(bǔ)丁, IQ15從15.4 ESD5以后,IQ16從 16.10之后開始都支持加強(qiáng)的iqunload了。
新加的幾個(gè)參數(shù)--
-tl <pattern_list> only output tables matching the given pattern string
-tld <pattern_list>
restrict the data extracted
-ul <pattern_list>
only output users matching the given pattern string
-null_string <string>
specify the null string string to use on extracted ascii character data
這幾個(gè)參數(shù)可以更加靈活地執(zhí)行導(dǎo)出。例如:
(1) 把所有tables都導(dǎo)出
$ iqunload -c dsn=dba -o iqunload.log -v /.../data_dir
(2) 導(dǎo)出一個(gè)在usr1的schema里的usr1_tab2的表的數(shù)據(jù)
$ iqunload -c dsn=dba -o iqunload.log -v -t 'usr1.usr1_tab2' /.../data_dir
(3) 使用通配符將所有名字內(nèi)含usr和tab1的表都導(dǎo)出
$ iqunload -c dsn=dba -o iqunload.log -v -tl '%usr%tab1' /.../data_dir
(4) 把在usr名下的表都導(dǎo)出
$ iqunload -c dsn=dba -o iqunload.log -v -ul 'usr%' /.../data_dir
(5) 把所有DDL都導(dǎo)出,但是只導(dǎo)出指定表的數(shù)據(jù)
$ iqunload -c dsn=dba -o iqunload.log -v -tld 'usr%' /.../data_dir
(6) 把-tl定義的表的DDL導(dǎo)出,但是只導(dǎo)出在tld里定義的表的數(shù)據(jù)并在reload.sql里生成相應(yīng)的load語句
$ iqunload -c dsn=dba -o iqunload.log -v -tl 'usr1%' -tld '%tab1' /.../data_dir
|
|