前段时间一同事使用如下命令导出数据全库遇到的错误特此简单记录一下:
nohup expdp \ "/ as sysdba\" directory=exp_dir dumpfile=full_%U.dmp logfile=fullexp.log parallel=4 filesize=5G full=y &


注意到 filesize=5G 这个是问题的关键点,全库数据量 1.2T 。这样导出的文件大约也会有 200 个之多,但是由于 dumpfile=full_%U.dmp 中 %U 的限制。%U 最大值只能是 99 个,所以这里去掉 filesize=5G 的限制,让系统自动生成 dump 文件即可, 至于 parallel=4 这个 4 是根据 CPU 核数确定的,最多可以是 CPU 核数的 2 倍,但也要看当时系统 CPU 压力而定,不能过大。
特此记录。。。
附件: %U参数
附上MOS上查到的相关资料,是关于%U参数所指定的99个dumpfile都不够用的情况下在增加数目的解决办法
Cause
You limited the number of files in DUMPFILE parameter with limited FILESIZE , i.e.:
full=Y
directory=dpump_dir
dumpfile=full_1.dmp,full_2.dmp,full_3.dmp,full_4.dmp
filesize=3000000000
This means max. 4 dump files with file size 3000000000 bytes (4x2.79 GB).
Solution
1. Use the dynamic format (i.e dumpfile=full_%U.dmp) :
The 'wildcard' specification for the dump file can expand up to 99 files. If 99 files have been generated before the export has completed, it will again return the ORA-39095 error.
2. If this is yet not enough and more files are needed, a workaround would be to speciyy a bigger FILESIZE parameter.
3. If this is inconvenient, then another option is to use this syntax:
dumpfile=fullexp%U.dmp, fullexp2_%U.dmp, fullexp3_%U.dmp
which can expand up to 3*99 files.
If encountering problems containing the dump in a single directory using this solution, you may prefer this syntax:
dumpfile=dmpdir1:fullexp1_%U.dmp, dmpdir2:fullexp2_%U.dmp, dmpdir3:fullexp3_U.dmp
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




