码迷,mamicode.com
首页 > 其他好文 > 详细

【翻译自mos文章】为什么在备份过程中rman不使用unused block 压缩功能

时间:2015-02-24 09:05:00      阅读:223      评论:0      收藏:0      [点我收藏+]

标签:rman 压缩

为什么在备份过程中rman不使用unused block 压缩功能?
来源于:
Why is RMAN not using Unused Block Compression during backup? (文档 ID 798844.1)

适用于:
Oracle Database - Enterprise Edition - Version 10.2.0.1 to 11.2.0.2 [Release 10.2 to 11.2]
Information in this document applies to any platform.
***Checked for relevance on 27-Nov-2013***

目标:
在10.2版本时,并符合下面的所有条件的情况下,rman将会使用unused block 压缩功能:

The COMPATIBLE initialization parameter is set to 10.2
There are currently no guaranteed restore points defined for the database
The datafile is locally managed
The datafile is being backed up to a backup set as part of a full backup or a level 0 incremental backup
The backup set is being created on disk or  OSB backup to tape


 

Note:
http://download.oracle.com/docs/cd/E11882_01/backup.112/e10643/rcmsynta007.htm#i1015382
.
Oracle Database Backup and Recovery Reference
11g Release 2 (11.2)
Part Number E10643-04
.
Backup
    backupTypeSpec

Note:
If COMPATIBLE is set to 10.2, then only tablespaces created with 10.2 compatibility will be optimized to exclude blocks that do not currently contain data. If COMPATIBLE is set to 11.0.0 or higher, however, then the first backup that produces backup sets after COMPATIBLE is set to 11.0.0 or higher will update the headers of all locally managed datafiles so that all locally managed datafiles can be optimized.


 

但是,下面的来自于v$backup_datafile的查询显示:在备份期间,所有的datafile 均是全部扫描(%READ 是100)

SQL> set lines 120
SQL> select file# fno, used_change_tracking BCT,
            incremental_level INCR, datafile_blocks BLKS,
            block_size blksz, blocks_read READ,
            round((blocks_read/datafile_blocks) * 100,2) "%READ",
            blocks WRTN, round((blocks/datafile_blocks)*100,2) "%WRTN"
       from v$backup_datafile
      where completion_time between
            to_date('25-jan-09 01:30:00', 'dd-mon-rr hh24:mi:ss') and
            to_date('26-jan-09 12:35:26', 'dd-mon-rr hh24:mi:ss')
   order by file#;


--
-- Change the dates as necessary to encompass the backup start and end times
-- and check the %READ value for each datafile.
--
-->将如上脚本的where条件修改一下,可以作为查询datafile 扫描率的一个常用脚本。


 

解决方案:
unused block 压缩 对 10.2.0.1版本是不适用的。
只有当在打10.2.0.2patch之后建立的tablespace 才能使用unused block 压缩

因此,对于如下情况的表空间, 是不能使用unused block 压缩功能的:
在10.2.0.2之前建立的表空间
在compatible 被设置为10.2之前建立的表空间

 

The cause of this problem has been identified and verified in an ‘unpublished‘ Bug 4720762 - Fixed in Product Version 11.0

【翻译自mos文章】为什么在备份过程中rman不使用unused block 压缩功能

标签:rman 压缩

原文地址:http://blog.csdn.net/msdnchina/article/details/43924129

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!