Академический Документы
Профессиональный Документы
Культура Документы
How do I find out how many (or %) of blocks changed between RMAN backups? [ID
866166.1]
In this Document
Purpose
Configuring the Sample Code
Running the Sample Code
Caution
Sample Code
Applies to:
Purpose
Customers often request queries to tell how many blocks changed between backups, to better understand
database usage. You query the v$backup_datafile view as shown, to determine how effective the change tracking
data is in minimizing the incremental backup I/O (the pct_read_for_backup column). A high percentage for the
pct_read_for_backup column indicates that RMAN reads most blocks in the data file during an incremental
backup. To reduce this ratio you decrease the time between incremental backups.
N/A
Caution
This sample code is provided for educational purposes only and not supported by Oracle Support Services. It has
been tested internally, however, and works as documented. We do not guarantee that it will work for you, so be
sure to test it in your environment before relying on it.
Proofread this sample code before using it! Due to the differences in the way text editors, e-mail packages and
operating systems handle text formatting (spaces, tabs and carriage returns), this sample code may not be in an
executable state when you first receive it. Check over the sample code to ensure that errors of this type are
corrected.
Sample Code
The following query will show % of blocks read for BCT incremental:
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=SAMPLE... 11/09/2010
Page 2 of 2
SELECT file#,
TRUNC(AVG(datafile_blocks)) blocks_in_file,
TRUNC(AVG(blocks_read)) blocks_read,
TRUNC(AVG(blocks)) blocks_backed_up,
TRUNC(AVG(blocks_read/datafile_blocks)*100)
pct_read_for_backup
FROM v$backup_datafile
WHERE used_change_tracking='YES'
Also, you can find out the difference in # of blocks read with a level 0, level 1 without BCT, and level 1 with BCT:
Related
Products
Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Enterprise Edition
Keywords
Back to top
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=SAMPLE... 11/09/2010