博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
How to estimate RMAN incremental backup size using block change tracking file (Doc ID 1938079.1)
阅读量:2042 次
发布时间:2019-04-28

本文共 2720 字,大约阅读时间需要 9 分钟。

How to estimate RMAN incremental backup size using block change tracking file (Doc ID 1938079.1)

 

Oracle Database - Enterprise Edition - Version 10.1.0.2 and later

Zero Data Loss Recovery Appliance Software - Version 12.1.0.1.0 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Information in this document applies to any platform.
***Checked for relevance on 7-Dec-2015***

GOAL

Customer wants to estimate their incremental backup size for disk / tape storage sizing purposes. The block change tracking (BCT) file tracks which database blocks were changed since the last RMAN backup, so that RMAN incremental backups only need to read and write the changed blocks. The change tracking file data can also be used to estimate future incremental backup size.

SOLUTION

Attached are two queries:

select file#,       blocks_changed,       block_size,       blocks_changed * block_size bytes_changed,       round(blocks_changed / blocks * 100, 2) percent_changedfrom v$datafile join     (select fno             file#,             sum(bct) blocks_changed      from (select distinct fno, bno, bct from x$krcbit            where vertime >= (select curr_vertime from x$krcfde                              where csno=x$krcbit.csno and fno=x$krcbit.fno))      group by fno order by 1)using(file#);

alter session set nls_date_format = 'yyyy-mm-dd hh24:mi:ss';set pagesize 9999select vertime, csno, fno, bno, bct from x$krcbitwhere vertime >= (select curr_vertime from x$krcfde                  where csno=x$krcbit.csno and fno=x$krcbit.fno)order by fno, bno;

The first gives a per-file summary of the number of blocks changed and the second lists all of the individual blocks that changed. The queries show all changes made since the last "bitmap switch". A bitmap switch occurs every time RMAN takes a backup. You can also force a bitmap switch to occur by calling dbms_backup_restore.bctswitch. So if you want to keep statistics for changes per day, week, whatever, then at the end of every interval you would first run the queries and capture the output, then call bctswitch. If you just want to track changes since the last backup, then you don't need to use bctswitch.

Ordinarily each change tracking bit covers 32KB of data (4 blocks if using the default 8KB block size). If you want each bit to only cover one block, set _bct_chunk_size=1 before enabling change tracking. This will give more accurate incremental size results, but BCT file size will also increase. When using change tracking solely as an incremental estimation method, we recommend setting _bct_chunk_size=1.

转载地址:http://pisof.baihongyu.com/

你可能感兴趣的文章
进制计算与转换
查看>>
二进制数的源码,反码,补码
查看>>
(PAT) 1051 Pop Sequence
查看>>
(计蒜客)骑马走江湖(BFS加剪枝)
查看>>
(模板 重要)Tarjan算法解决LCA问题(PAT 1151 LCA in a Binary Tree)
查看>>
(PAT 1125) Chain the Ropes (贪心+优先级队列的应用)
查看>>
1013 Battle Over Cities (DFS+连同分量)
查看>>
(PAT 1154) Vertex Coloring (图的广度优先遍历)
查看>>
(PAT 1115) Counting Nodes in a BST (二叉查找树-统计指定层元素个数)
查看>>
(PAT 1143) Lowest Common Ancestor (二叉查找树的LCA)
查看>>
(PAT 1061) Dating (字符串处理)
查看>>
(PAT 1118) Birds in Forest (并查集)
查看>>
数据结构 拓扑排序
查看>>
(PAT 1040) Longest Symmetric String (DP-最长回文子串)
查看>>
(PAT 1145) Hashing - Average Search Time (哈希表冲突处理)
查看>>
(1129) Recommendation System 排序
查看>>
PAT1090 Highest Price in Supply Chain 树DFS
查看>>
(PAT 1096) Consecutive Factors (质因子分解)
查看>>
(PAT 1019) General Palindromic Number (进制转换)
查看>>
(PAT 1073) Scientific Notation (字符串模拟题)
查看>>