Oracle Block Change Tracking
Version 18.3.0.1

General Information
Library Note Morgan's Library Page Header
Coming to OpenWorld 2018? Be sure to visit the TidalScale booth in Moscone South and learn how to solve performance problems and lower costs with Software Defined Servers. Before you visit the booth, or if you can't make it this year, check out TidalScale at www.tidalscale.com. Be sure to click on the Solutions link and look through the Oracle resources.
Note: Once enabled; this new 10g feature records the modified since last backup and stores the log of it in a block change tracking file using the CTW (Change Tracking Writer) process. During backups RMAN uses the log file to identify the specific blocks that must be backed up. This improves RMAN's performance as it does not have to scan whole datafiles to detect changed blocks. Logging of changed blocks is performed by the CTRW process which is also responsible for writing data to the block change tracking file.

You can only enable block change tracking at a physical standby database if a license for the Oracle Active Data Guard option has been purchased and this option is enabled. To enable Active Data Guard on a standby database, set the ENABLE_OPTION_ACTIVE_DATA_GUARD initialization parameter to TRUE. If a license for the Data Guard option has not been purchased, the ENABLE_OPTION_ACTIVE_DATA_GUARD initialization parameter should be set to FALSE. The open standby database will be closed, if recovery is started, and the following message is displayed in the alert log: You have note enabled the Active Data Guard option by setting ENABLE_OPTION_ACTIVE_DATA_GUARD to TRUE. The standby database will be closed before starting recover.
 
DISABLE
Disable block change tracking ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;
conn / as sysdba

SELECT filename, status, bytes
FROM v$block_change_tracking;

ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;

SELECT filename, status, bytes
FROM v$block_change_tracking;

SELECT *
FROM gv$sgastat
WHERE name LIKE '%CTWR%';

SELECT inst_id, sid, program, status
FROM gv$session
WHERE program LIKE '%CTWR%';
 
ENABLE
Enable block change tracking ALTER DATABASE ENABLE BLOCK CHANGE TRACKING [USING FILE <file_path_and_name>] [REUSE];
conn / as sysdba

SQL> col filename format a60

SQL> SELECT filename, status, bytes
  2  FROM v$block_change_tracking;

FILENAME                                               STATUS     BYTES
------------------------------------------------------ ---------- ----------
                                                       DISABLED

SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING
  2 
USING FILE '/u01/app/oracle/fast_recovery_area/ORABASE/bctf01.log';

Database altered.

SQL> SELECT filename, status, bytes
  2  FROM v$block_change_tracking;

FILENAME                                               STATUS         BYTES
------------------------------------------------------ ---------- ---------
/u01/app/oracle/fast_recovery_area/ORABASE/bctf01.log  ENABLED     11599872

SQL> SELECT *
  2  FROM gv$sgastat
  3  WHERE name LIKE '%CTWR%';

 INST_ID   POOL           NAME               BYTES   CON_ID
---------- -------------- ---------------- -------- -------
         1 large pool     CTWR dba buffer   1015808       1

SQL> SELECT inst_id, sid, program, status
  2  FROM gv$session
  3  WHERE program LIKE '%CTWR%';

 INST_ID  SID PROGRAM                   STATUS
-------- ---- ------------------------- -------
       1  189 oracle@db18c-ee-hp (CTWR) ACTIVE

Related Topics
Backup Restore and Recover
CTWR Process
RMAN
RMAN Demos
What's New In 12cR2
What's New In 18cR1

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2017 Daniel A. Morgan All Rights Reserved