这个压缩比例可以和操作系统“gzip -9”相媲美,某些特例下有可能比gzip还要高效。体验之,供参考。

1.Oracle 11g中expdp帮助页中关于COMPRESSION参数的描述

secooler@secDB /home/oracle$ expdp -help

……

COMPRESSION

Reduce the size of a dump file.

Valid keyword values are: ALL, DATA_ONLY, [METADATA_ONLY] and NONE.

……

可见,11g中的COMPRESSION参数提供四个选项,分别是ALL、DATA_ONLY、METADATA_ONLY和NONE,非常的丰富,稍后我们将使用ALL参数进行操作。

2.Oracle 10g中关于COMPRESSION参数的描述如下

Keyword              Description (Default)

---------------------------------------------------------------------

……

COMPRESSION          Reduce size of dumpfile contents where valid

keyword values are: (METADATA_ONLY) and NONE.

……

10g中的COMPRESSION参数只提供METADATA_ONLY和NONE两个选项,基本上没有提供压缩功能。

3.使用11g EXPDP工具的四个压缩参数分别生成四个dump文件

1)使用ALL参数

secooler@secDB /expdp$ expdp sec/sec dumpfile=sec_ALL.dmp logfile=sec_ALL.log tables=t directory=dump_dir compression=ALL

Export: Release 11.2.0.1.0 - Production on Sat Mar 20 22:48:52 2010

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, Oracle Label Security, OLAP, Data Mining,

Oracle Database Vault and Real Application Testing options

Starting "SEC"."SYS_EXPORT_TABLE_01":  sec/******** dumpfile=sec_ALL.dmp logfile=sec_ALL.log tables=t directory=dump_dir compression=ALL

Estimate in progress using BLOCKS method...

Processing object type TABLE_EXPORT/TABLE/TABLE_DATA

Total estimation using BLOCKS method: 136 MB

Processing object type TABLE_EXPORT/TABLE/TABLE

. . exported "SEC"."T"                                  14.26 MB 1155520 rows

Master table "SEC"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded

******************************************************************************

Dump file set for SEC.SYS_EXPORT_TABLE_01 is:

/expdp/sec_ALL.dmp

Job "SEC"."SYS_EXPORT_TABLE_01" successfully completed at 22:49:08

2)使用DATA_ONLY参数

secooler@secDB /expdp$ expdp sec/sec dumpfile=sec_DATA_ONLY.dmp logfile=sec_DATA_ONLY.log tables=t directory=dump_dir compression=DATA_ONLY

Export: Release 11.2.0.1.0 - Production on Sat Mar 20 22:49:32 2010

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, Oracle Label Security, OLAP, Data Mining,

Oracle Database Vault and Real Application Testing options

Starting "SEC"."SYS_EXPORT_TABLE_01":  sec/******** dumpfile=sec_DATA_ONLY.dmp logfile=sec_DATA_ONLY.log tables=t directory=dump_dir compression=DATA_ONLY

Estimate in progress using BLOCKS method...

Processing object type TABLE_EXPORT/TABLE/TABLE_DATA

Total estimation using BLOCKS method: 136 MB

Processing object type TABLE_EXPORT/TABLE/TABLE

. . exported "SEC"."T"                                  14.26 MB 1155520 rows

Master table "SEC"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded

******************************************************************************

Dump file set for SEC.SYS_EXPORT_TABLE_01 is:

/expdp/sec_DATA_ONLY.dmp

Job "SEC"."SYS_EXPORT_TABLE_01" successfully completed at 22:49:48

3)使用METADATA_ONLY参数

secooler@secDB /expdp$ expdp sec/sec dumpfile=sec_METADATA_ONLY.dmp logfile=sec_METADATA_ONLY.log tables=t directory=dump_dir compression=METADATA_ONLY

Export: Release 11.2.0.1.0 - Production on Sat Mar 20 22:50:16 2010

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, Oracle Label Security, OLAP, Data Mining,

Oracle Database Vault and Real Application Testing options

Starting "SEC"."SYS_EXPORT_TABLE_01":  sec/******** dumpfile=sec_METADATA_ONLY.dmp logfile=sec_METADATA_ONLY.log tables=t directory=dump_dir compression=METADATA_ONLY

Estimate in progress using BLOCKS method...

Processing object type TABLE_EXPORT/TABLE/TABLE_DATA

Total estimation using BLOCKS method: 136 MB

Processing object type TABLE_EXPORT/TABLE/TABLE

. . exported "SEC"."T"                                  111.7 MB 1155520 rows

Master table "SEC"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded

******************************************************************************

Dump file set for SEC.SYS_EXPORT_TABLE_01 is:

/expdp/sec_METADATA_ONLY.dmp

Job "SEC"."SYS_EXPORT_TABLE_01" successfully completed at 22:50:27

4)使用NONE参数

secooler@secDB /expdp$ expdp sec/sec dumpfile=sec_NONE.dmp logfile=sec_NONE.log tables=t directory=dump_dir compression=NONE

Export: Release 11.2.0.1.0 - Production on Sat Mar 20 22:50:43 2010

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, Oracle Label Security, OLAP, Data Mining,

Oracle Database Vault and Real Application Testing options

Starting "SEC"."SYS_EXPORT_TABLE_01":  sec/******** dumpfile=sec_NONE.dmp logfile=sec_NONE.log tables=t directory=dump_dir compression=NONE

Estimate in progress using BLOCKS method...

Processing object type TABLE_EXPORT/TABLE/TABLE_DATA

Total estimation using BLOCKS method: 136 MB

Processing object type TABLE_EXPORT/TABLE/TABLE

. . exported "SEC"."T"                                  111.7 MB 1155520 rows

Master table "SEC"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded

******************************************************************************

Dump file set for SEC.SYS_EXPORT_TABLE_01 is:

/expdp/sec_NONE.dmp

Job "SEC"."SYS_EXPORT_TABLE_01" successfully completed at 22:50:53

4.比较生成的四个dump文件大小

secooler@secDB /expdp$ du -sm sec*.dmp

15      sec_ALL.dmp

15      sec_DATA_ONLY.dmp

112    sec_METADATA_ONLY.dmp

112    sec_NONE.dmp

secooler@secDB /expdp$ du -sb sec*.dmp

14987264        sec_ALL.dmp

14987264        sec_DATA_ONLY.dmp

117223424      sec_METADATA_ONLY.dmp

117223424      sec_NONE.dmp

实验表明,使用ALL参数和DATA_ONLY参数生成的备份文件基本一样大;使用METADATA_ONLY参数与NONE参数效果一样。

使用压缩与不进行压缩的比率是:15/112约等于1/7!

这才是真正的压缩。

5.使用“gzip -9”对未压缩的备份文件进行压缩,做一下比较

secooler@secDB /expdp$ gzip -9 sec_NONE.dmp

secooler@secDB /expdp$ du -sm sec*dmp*

15      sec_ALL.dmp

15      sec_DATA_ONLY.dmp

112    sec_METADATA_ONLY.dmp

15      sec_NONE.dmp.gz

secooler@secDB /expdp$ du -sb sec*dmp*

14987264        sec_ALL.dmp

14987264        sec_DATA_ONLY.dmp

117223424      sec_METADATA_ONLY.dmp

14717055        sec_NONE.dmp.gz

14987264与14717055的区别,相差甚微,基本相同,“gzip -9”稍胜一点点(也许在您的具体环境下“gzip -9”会逊色一点点)。

6.小结

Oracle 11g的EXPDP工具提供了真正意义上的“备份压缩”,这个技术在备份空间不足的情况下非常实用。

Oracle在改进和优化中不断的前进,慢慢体会吧。

----------------------------华丽丽的分割线----------------------------

oracle压缩参数,Oracle 11g版本EXPDP 的COMPRESSION参数压缩比堪比“gzip -9”相关推荐

  1. 【EXPDP】11g版本EXPDP 的COMPRESSION参数压缩比堪比“gzip -9”

    这个压缩比例可以和操作系统"gzip -9"相媲美,某些特例下有可能比gzip还要高效.体验之,供参考. 1.Oracle 11g中expdp帮助页中关于COMPRESSION参数 ...

  2. Oracle Goldengate OGG 11g与各操作系统及数据库版本的兼容列表

    Oracle Goldengate OGG 11g (11.1.1.0.0)与各操作系统及数据库版本的兼容列表如下,仅供参考: Oracle GoldenGate Certification Matr ...

  3. Oracle 11g版本下载及安装超详细教程图解

    目录 一.11g版本下载 1.oracle 11g官网(各个版本及服务端.客户端) 2.oracle 11g 迅雷下载地址(两个文件,下载完成后解压到一起,安装即可) 二.Oracle安装步骤图解 1 ...

  4. Oracle甲骨文11G版本快速安装

    1 如果电脑中安装过Oracle数据库,并且没有安装成功,得卸载. 因为卸载也比较麻烦,先暂时不卸载,搏一搏~ 一.Oracle 11g下载 官网下载地址 https://www.oracle.com ...

  5. 【Oracle健康检查脚本加量不加价】对Oracle 10g、11g和12c版本分别提供了只读版,并且加上了MySQL的健康检查...

    目前一共包含6个脚本,若脚本的扩展名为".sql"则表示该脚本为sql脚本,若脚本的扩展名为".pl"则表示该脚本为perl脚本. 对于SQL脚本而言,其中DB ...

  6. oracle数据库从AIX环境expdp迁移到linux环境(sec_case_sensitive_logon=true导致连接报错ORA-01017)

    oracle数据库从AIX环境(11.2.0.4)expdp迁移到linux环境(11.2.0.4)(sec_case_sensitive_logon=true导致连接报错ORA-01017) 将se ...

  7. oracle 数据泵导入导出 expdp/impdp

    一. 导出/入前检查 查看用户默认表空间 select USERNAME,DEFAULT_TABLESPACE,TEMPORARY_TABLESPACE from dba_users where US ...

  8. oracle 10g和11g的互相导入和导出

    GPS平台.网站建设.软件开发.系统运维,找森大网络科技! https://cnsendnet.taobao.com 来自森大科技官方博客 http://www.cnsendblog.com/inde ...

  9. Oracle数据泵备份与恢复 命令 expdp/impdp 用法详解

    Oracle数据泵备份与恢复 命令 expdp/impdp 用法详解 关于expdp和impdp     使用EXPDP和IMPDP时应该注意的事项: EXP和IMP是客户端工具程序,它们既可以在客户 ...

最新文章

  1. 因为WMI配置,无法执行Sql Server 系统配置检查器的解决办法
  2. python二维数组初始化
  3. python中的数字类型格式与运算_Python中的数字类型格式与运算
  4. php简单的mysql类_一个简单的php mysql操作类
  5. React的Ant Design Pro目录结构
  6. Ixia推出首款太比特级网络安全测试平台
  7. mysql怎么显示结果窗口_mysql8中窗口函数
  8. 快速开发框架工作笔记002---项目开发中整理_整合好的_Netty高并发处理快速开发框架_Netty快速开发框架
  9. Php AES加密、解密与Java互操作的问题
  10. 华为静态路由配置及讲解
  11. java double 初始化_java语言程序员之正确的初始化
  12. linux命令dstat,linux系统监控:dstat命令
  13. python开发微信点餐_微信点餐平台开发 (一)
  14. Ubuntu 命令行下修改IP等
  15. python常用数学符号_ML-常用数学符号(示例代码)
  16. 一张思维导图完成淘宝精细化运营
  17. 各纬度气候分布图_【地理干货】气压带和风带知识点总结,附世界各种气候类型分布图(高清版)汇总!...
  18. python实现截取excel中的表格,生成图片
  19. 按月显示的万年历(含农历)网页代码
  20. 【计算机毕业设计】328学生就业管理系统设计与实现

热门文章

  1. 【转载】送到榨油厂的飞鸽传书
  2. C/C++基础知识10道题,你都会吗?
  3. 2个程序员街头卖唱,挽救了自己的秃头
  4. 精通webpack的5大关键点
  5. 【福利】3980元的web前端视频教程限量领取!!!
  6. ubuntu下ZED相机开发环境安装
  7. 嵌入式开发板02---点亮LED升级版
  8. raspberry中配置机器学习的环境
  9. 使用ComplexHeatmap绘制3D热图
  10. 不用Linux也可以的强大文本处理方法