Skip to main content

Implement Block Change Tracking in Oracle Database



What is Block Change Tracking?

Block Change Tracking is an Oracle Database feature used with RMAN incremental backups. It tracks the physical locations of changed blocks in the database and stores this information in a separate file called the Block Change Tracking file. Oracle documentation states that this tracking information is maintained in a separate file and is used for tasks such as improving incremental backup performance.

Without BCT, RMAN may need to scan the datafiles to determine which blocks have changed since the previous backup. With BCT enabled, RMAN can directly read the change tracking file and identify changed blocks more efficiently.

-----

Login to SQL

sqlplus / as sysdba


         Set lin 400

SELECT status, filename, bytes

FROM   v$block_change_tracking;


CHECK OMF

SHOW PARAMETER db_create_file_dest; 


ENABLE BCT (BLOCK CHAIN TRACKING)

Common method:

ALTER DATABASE ENABLE BLOCK CHANGE TRACKING; 

Add to a file path:

ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '/u01/oradata/DBNAME/bct_file.ctf'; 

Add to ASM

ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '+DATA'; 

DISABLE BCT

I have also encountered issues when RMAN restoring and opening database where i used to occur the error that it is unable to find the file for BCT. in such case senario you can drop the database data file with regards to BCT using below command.

ALTER DATABASE DISABLE BLOCK CHANGE TRACKING; 



Advantage of enabling the BCT.

- Faster RMAN incremental backups

BCT helps RMAN quickly identify changed blocks instead of scanning entire datafiles.

- Reduced backup window

Since RMAN reads only the changed block information, incremental backups complete faster, which is useful for large databases.

- Lower I/O during backups

BCT reduces unnecessary datafile scanning, which helps reduce disk I/O and improves overall backup efficiency. 

Comments

Popular posts from this blog

How To Enable Flash Recovery Area In Oracle Database

  The flash recovery area(FRA) is an Oracle-managed destination( either FILE SYSTEM or ASM ) for centralized backup and recovery files. It simplifies the backup management. The following recovery-related files are stored in the flash recovery area: — Current control file — Online redo logs — Archived redo logs — Flashback logs — Control file auto backups — Datafile and control file copies — Backup pieces — Foreign archived redo log Below are the steps for enabling  flash  recovery area. DB_RECOVERY_FILE_DEST_SIZE   and  DB_RECOVERY_FILE_DEST   initial parameters are required for enabling FRA. DB_RECOVERY_FILE_DEST_SIZE   -> It is the disk quota size for the flash recovery area. DB_RECOVERY_FILE_DEST   – > This initialization parameter is a valid destination for the Flash Recovery Area. It can be a directory, file system, or ASM disk group. NOTE  : DB_RECOVERY_FILE_DEST_SIZE must be set before DB_RECOVERY_FILE_DEST. 1. Check whether FRA ...

Convert TIMESTAMP to SCN and SCN to TIMESTAMP in Oracle

  Convert TIMESTAMP to SCN and SCN to TIMESTAMP in Oracle In many recovery scenario we need to know our SCN and timestamps. We can convert this by using the following function SCN_TO_TIMESTAMP TIMESTAMP_TO_SCN We can use this function with help of dual functions. Example of using this function as follows: 1. Convert the SCN to Timestamp SQL> select scn_to_timestamp(2011955) from dual; SCN_TO_TIMESTAMP(2011955) ----------------------------------------------------- 05-SEP-18 12.46.20.000000000 PM 2. Convert the Timestamp to SCN SQL> select timestamp_to_scn(to_timestamp('05-09-2018 12:46:21','dd-mm-yyyy hh24:mi:ss')) scn from dual; SCN ---------- 2011955

How to Set the IP Address in Redhat 7 || RHEL7 or Centos7 Step by Step

How to Set the IP Address in Redhat 7 || RHEL7 or Centos7 Step by Step go to terminal  login to root  # su - # ip a to check the ip address and details # dhclient  use to request a client from the dns server # browse to the below location cd /etc/sysconfig/network-scripts open vi ifcfg-eno(the connection file) edit the connection file and remove IPV6 records and add  ONBOOT = YES IPADDR = 192.168.160.32 PREFIX = 24 GATEWAY = 192.168.160.1 save the file and cat open the file to check if its saved properly. then ifdown ifcfg-eno  and ifup ifcfg-eno restart the pc by using shutdown -r and see the results reference : https://www.youtube.com/watch?v=oQd5eG9BZXE