写一个par file,把所有你想导出的表列出来。 这个 可以通过 spool table.txt select table_name from user_tables: spool off; 保存到table.txt中,再用utral edit 编辑下。最后做一个exp 脚本 exp parfile=export_options.par |||||||||||||| Export Parameter FilesParameter files are a convenient way to consolidate all the options from a file that will be used when executing the utility. The benefit of the parameter file is that it allows the options to be specified once and reused by all utility jobs. Three of the utilities discussed in this chapter (export, import, SQL*Loader) support parameter files. Below is an example of an export parameter file: export_options.par. compress=n direct=n buffer=1000 tables=table_with_one_million_rows userid=scott/tigerUsing this parameter file, the export command line is executed by the following: exp parfile=export_options.par Specifying options in a file makes it much easier to implement the options with any utility that accepts a parameter file. In addition, these options are not revealed on the command line, and therefore not exposed to commands ( UNIX ps command ) that would reveal the username and password had they been specified on the command line.||||||||||||
如果10g以上,可以使用expdp,impdp具有这种功能,使用参数exclude
这个 可以通过
spool table.txt
select table_name from user_tables:
spool off;
保存到table.txt中,再用utral edit 编辑下。最后做一个exp 脚本
exp parfile=export_options.par ||||||||||||||
Export Parameter FilesParameter files are a convenient way to consolidate all the options from a file that will be used when executing the utility. The benefit of the parameter file is that it allows the options to be specified once and reused by all utility jobs. Three of the utilities discussed in this chapter (export, import, SQL*Loader) support parameter files. Below is an example of an export parameter file: export_options.par. compress=n
direct=n
buffer=1000
tables=table_with_one_million_rows
userid=scott/tigerUsing this parameter file, the export command line is executed by the following: exp parfile=export_options.par Specifying options in a file makes it much easier to implement the options with any utility that accepts a parameter file. In addition, these options are not revealed on the command line, and therefore not exposed to commands ( UNIX ps command ) that would reveal the username and password had they been specified on the command line.||||||||||||
用utral edit在每个表明前面加‘,’吗?
还有在export_options.par 里面怎么用引用table.txt文件呢?
listfile=table.txt --试试
userid = kingstar/kingstar@headdb_bakstatistics=none
rows=Y
compress=N
buffer=4096
feedback=100000
listfile = table.txt
tables = listfilefile=(D:\EXP_DUMP_20100417\exp_dat_olap_20100421_1.dmp, D:\EXP_DUMP_20100417\exp_dat_olap_20100421_2.dmp, D:\EXP_DUMP_20100417\exp_dat_olap_20100421_3.dmp)
filesize=5G
log=D:\EXP_DUMP_20100417\exp_dat_olap_20100421.log table.txt内容:
olap.TB_DIM_TIME,
olap.TB_DIM_OFTA_CONTACT_INFO,
olap.TB_DIM_OFCODE_TYPE,
olap.TB_DIM_OFCODE_LEVEL,
olap.TB_DIM_DIY_CLASSTYPE,
olap.TB_DIM_CLIENT_INFO,
olap.TB_INNER_TIME(等等等很多)在cmd窗口执行后的结果是:
C:\Documents and Settings\Administrator>exp parfile=D:\EXP_DUMP_20100417\test.par
LRM-00101: 未知的参数名 'listfile'
LRM-00113: 处理文件 'D:\EXP_DUMP_20100417\test.par' 时出错EXP-00019: 处理参数失败, 请键入 'EXP HELP=Y' 获取帮助信息
EXP-00000: 导出终止失败
首先得考虑效率问题。所以问的是用命令方式导出。
USERID=giapuser/oracle
buffer=40960000
file=exp_giapuser_data.dmp
LOG=exp_giapuser_data.log
COMPRESS=N
ROWS=Y
recordlength=65535
DIRECT=Y
FEEDBACK=10000
tables=(
AJ_AJYS
AJ_BDQ
AJ_BDQ_ZLSH
AJ_BLXX
AJ_BSQHB
AJ_CLCS
AJ_DW_CLCS
AJ_FLOWCHART
AJ_FLWS
AJ_FLWSSM
AJ_FXXYRXX
....
....
....
)
AJ_AJYS
AJ_BDQ
AJ_BDQ_ZLSH
AJ_BLXX
AJ_BSQHB
AJ_CLCS
AJ_DW_CLCS
AJ_FLOWCHART
AJ_FLWS
AJ_FLWSSM
AJ_FXXYRXX
....
....
....
)贴进来,而是直接饮用建的tables.txt。刚才ty_tarena_pger回复我用listfile=table.txt
但报listfile不存在。
是不是没法实现啊?
谢谢了。
AJ_AJYS
AJ_BDQ
AJ_BDQ_ZLSH
AJ_BLXX
AJ_BSQHB
AJ_CLCS
AJ_DW_CLCS
AJ_FLOWCHART
AJ_FLWS
AJ_FLWSSM
AJ_FXXYRXX
....
....
....
)
这里把所有的table都列进来,
可以直接用utraledit 编辑实现的。