ITPub博客

首页 > 数据库 > Oracle > [20140828]测试exp 管道压缩.txt

[20140828]测试exp 管道压缩.txt

原创 Oracle 作者:lfree 时间:2014-08-28 11:57:43 0 删除 编辑

[20140828]测试exp 管道压缩.txt

--我很久就知道导出可以管道压缩导出文件,实现一边导出一边压缩的功能,现在硬盘空间都很大,很少考虑这种方式.
--自己从来没有测试,测试看看。

SCOTT@test> @ver
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production


1.导出到文件
exp scott/btbtms file=ticd10x.dmp tables=ticd10  buffer=20971520 consistent=y log=ticd10_exp.log direct=y triggers=n

2.测试管道:
$ cat aa.sh
#! /bin/bash
mknod exp_pipe p
exp scott/btbtms file=exp_pipe tables=ticd10  buffer=20971520 consistent=y log=ticd10_exp.log direct=y triggers=n &
sleep 1
cat exp_pipe| gzip  > ticd10.dmp &

$ source aa.sh > /dev/null 2>&1

3.测试是否正确:
$ gunzip ticd10.dmp.gz
$ ll ticd10*.dmp
-rw-r--r--  1 oracle11g oinstall 1769472 2014-08-28 11:34:47 ticd10.dmp
-rw-r--r--  1 oracle11g oinstall 1769472 2014-08-28 11:31:42 ticd10x.dmp


--测试通过,文件大小一样!

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/267265/viewspace-1259445/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    4006
  • 访问量
    7971388