oracle exp不生成dumpfile,预估出实际导出文件的大小。
目的:在不创建dumpfile前预估出需要的导出文件大小。 适用于export 实验步骤如下:
OS: Linux test20 2.6.18-238.el5 #1 SMP Sun Dec 19 14:22:44 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
ORACLE: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
1、 创建一个管道文件
[oracle@test20 oracle]$ mknod exp.pipe p
[oracle@test20 oracle]$ ll exp.pipe
prw-r--r-- 1 oracle oinstall 0 Mar 1 13:17 exp.pipe
2、dd命令往文件中写入
dd if=/oracle/exp.pipe of=/dev/null bs=1024 &
3、导出需要的对象,设置dumpfile为exp.pipe
[oracle@test20 oracle]$ exp yyf/yyf file=/oracle/exp.pipe tables=yyf
Export: Release 10.2.0.4.0 - Production on Fri Mar 1 13:21:12 2013
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 YYF 807920 rows exported
Export terminated successfully without warnings.
85856+0 records in
85856+0 records out
87916544 bytes (88 MB) copied, 6.24984 seconds, 14.1 MB/s
[1]+ Done dd if=/oracle/exp.pipe of=/dev/null bs=1024
4、估算完后,查看exp.pipe文件大小
[oracle@test20 oracle]$ ll
prw-r--r-- 1 oracle oinstall 0 Mar 1 13:21 exp.pipe <<-------由此看出实际是没有写入数据。原因在于of=/dev/null
5、实际导出,并查看文件dumpfile大小。
[oracle@test20 oracle]$ exp yyf/yyf file=/oracle/yyf.dmp tables=yyf
About to export specified tables via Conventional Path ...
. . exporting table YYF 807920 rows exported
Export terminated successfully without warnings.
[oracle@test20 oracle]$ ll yyf.dmp
-rw-r--r-- 1 oracle oinstall 87916544 Mar 1 11:44 yyf.dmp
ps:现在的磁盘价格,根本用不着估算的这么准确。
最新文章
- Load Test Analyzer Overview
- tet
- C# checkboxlist的使用
- 07Mybatis_入门程序——根据前面的做的两个查询联系,做一些小的总结
- js获取事件源
- bottomNavigationBar 底部导航tab MD
- 使用URL访问网络资源
- hdu 2473 并查集
- JavaScript函数柯里化的一些思考
- PHP中output control
- Linux C 简易聊天室
- Visual Studio 有哪些好用的插件?
- 转:spring配置文件中xsd引用问题
- 20165310 NetSec Week4 Exp2 后门原理与实践
- 第二次项目冲刺(Beta版本)2017/12/6
- MyBatis insert操作插入,返回主键from官方
- asp.net中WinForm使用单例模式示例
- iOS:自定义字体
- Android自己定义控件:进度条的四种实现方式
- Function Object in C++