【EXPDP】11g版本EXPDP 的COMPRESSION参数压缩比堪比“gzip -9”
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在改进和优化中不断的前进,慢慢体会吧。
Good luck.
secooler
10.03.20
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/519536/viewspace-630005/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/519536/viewspace-630005/
【EXPDP】11g版本EXPDP 的COMPRESSION参数压缩比堪比“gzip -9”相关推荐
- oracle压缩参数,Oracle 11g版本EXPDP 的COMPRESSION参数压缩比堪比“gzip -9”
这个压缩比例可以和操作系统"gzip -9"相媲美,某些特例下有可能比gzip还要高效.体验之,供参考. 1.Oracle 11g中expdp帮助页中关于COMPRESSION参数 ...
- oracle 11g 备份导入12c,关于12C版本导出导入11G版本的这点事
一.介绍实验使用的例子 1.创建一个实验环境 先创建一个名字叫user_testtbs的表空间 SQL> create tablespaceuser_testtbs 2 datafile '/ ...
- Oracle 11g版本下载及安装超详细教程图解
目录 一.11g版本下载 1.oracle 11g官网(各个版本及服务端.客户端) 2.oracle 11g 迅雷下载地址(两个文件,下载完成后解压到一起,安装即可) 二.Oracle安装步骤图解 1 ...
- Oracle甲骨文11G版本快速安装
1 如果电脑中安装过Oracle数据库,并且没有安装成功,得卸载. 因为卸载也比较麻烦,先暂时不卸载,搏一搏~ 一.Oracle 11g下载 官网下载地址 https://www.oracle.com ...
- R语言使用tiff函数将可视化图像结果保存tiff格式、使用tiff函数打开图像设备、使用dev.off函数关闭图像设备、使用compression参数自定义压缩类型(形式)
R语言使用tiff函数将可视化图像结果保存tiff格式.使用tiff函数打开图像设备.使用dev.off函数关闭图像设备.使用compression参数自定义压缩类型(形式) 目录
- oracle 11g ora31626,expdp时候出错:ORA-31626,ORA-31637,ORA-39062,ORA-31613
博客文章除注明转载外,均为原创.有朋友在数据库上进行expdp 碰到错误如下: Connected to: Oracle Database 11g Enterprise Edition Release ...
- oracle查询备份大小,【EXPDP】使用EXPDP备份数据时预估大小——ESTIMATE参数
使用EXPDP在完成数据导出时,可以使用ESTIMATE参数评估待导出数据库对象的大小,简单演示一下,供参考.1.查看有关ESTIMATE参数的帮助信息1)查看命令行帮助信息ora10g@secDB ...
- Oracle表无法expdp,{Oracle数据库}EXPDP报错ORA-39171、ORA-01691解决方法
数据泵导出过程: SQL> create user aaa identified by aaa_1234 account unlock; User created. SQL> grant ...
- oracle查看expdp进度,监控EXPDP/IMPDP进度
--获取JOB_NAME select * from DBA_DATAPUMP_JOBS; OWNER_NAME JOB_NAME OPERATION JOB_MODE STATE DEGREE AT ...
最新文章
- 硬件手册里经常出现的assert以及deassert
- linux服务器同时运行两个或多个tomcat
- 关于创业公司产品开发原则
- C++实现utf8和gbk编码字符串互相转换
- Dapp开发教程四 Asch Dapp Dice Game
- WCF技术剖析之十七:消息(Message)详解(下篇)
- Flutter 即将占领整个 Web 开发
- 4.1 Spark SQL概述
- Spring Cloud Hystrix服务容错 (学习总结)
- 网易云音乐Mac上传云盘
- Port Security (端口安全)
- 【从零开始】阿里云服务器配置web开发环境及部署本地web项目
- 全免费、保姆级Eclipse32位软件、安装、运行一条龙记录
- xadmin自定义页面
- JAVA 知识点 | Hook
- vmware workstation中搭建云平台,虚拟机重启遇到的问题
- Win11桌面图标的小盾牌怎么去掉?
- 什么是单线程单元(STA)什么是多线程单元(MTA)
- 锁相环PLL --原理浅析
- android开启服务应用禁止被杀死,Android Service服务如何不被杀死