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:现在的磁盘价格,根本用不着估算的这么准确。
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值