Search This Blog

Tuesday, 30 June 2020

Block Change Tracking (BCT)

 Enabling Block Change Tracking



Block changing tracking improves the performance of incremental backups by recording changed blocks in the block change tracking file. During an incremental backup, instead of scanning all data blocks to identify which blocks have changed, RMAN uses this file to identify the changed blocks that need to be backed up.
You can enable block change tracking when the database is either open or mounted. This section assumes that you intend to create the block change tracking file as an Oracle Managed File in the database area, which is where the database maintains active database files such as data files, control files, and online redo log files.
To determine if block change tracking is enabled, check the STATUS and FILENAME columns in the V$BLOCK_CHANGE_TRACKING view, using the following statement from the SQL or RMAN prompt:
SELECT status, filename FROM V$BLOCK_CHANGE_TRACKING;

To enable block change tracking:

Connect RMAN to the target database as described in "Connecting to the Target Database Using RMAN."
Determine the current location of the database data files by submitting the following query:
RMAN> SELECT NAME FROM V$DATAFILE;

******************************************************************************

Action Plan Implementation :


Microsoft Windows [Version 10.0.18362.904]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\mmussaib>sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Tue Jun 30 14:02:39 2020

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> SELECT status  FROM v$block_change_tracking;

STATUS
----------
DISABLED

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

C:\Users\mmussaib>rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Tue Jun 30 14:03:00 2020

Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.

connected to target database: MUSAIB (DBID=42443199)

RMAN> SELECT NAME FROM V$DATAFILE;

using target database control file instead of recovery catalog


NAME
--------------------------------------------------------------------------------

C:\APP\MMUSSAIB\VIRTUAL\ORADATA\MUSAIB\SYSTEM01.DBF


C:\APP\MMUSSAIB\VIRTUAL\ORADATA\MUSAIB\SYSAUX01.DBF


C:\APP\MMUSSAIB\VIRTUAL\ORADATA\MUSAIB\UNDOTBS01.DBF


C:\APP\MMUSSAIB\VIRTUAL\ORADATA\MUSAIB\USERS01.DBF


RMAN> ALTER SYSTEM SET DB_CREATE_FILE_DEST ='C:\APP\MMUSSAIB\VIRTUAL\ORADATA\MUSAIB';

Statement processed

RMAN> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;

Statement processed

RMAN> SELECT status  FROM v$block_change_tracking;

STATUS
----------
ENABLED

No comments:

Post a Comment