How to rename block change tracking file?

To move/rename current block change tracking file, one would need to restart the database.

# Get current block change tracking file
SQL> SELECT filename FROM v$block_change_tracking;

FILENAME
——————————————————————————–
/tmp/blocktracking.f

# Shutdown database and start database in mount state
SQL> SHUTDOWN IMMEDIATE;

SQL> STARTUP MOUNT;

# Rename block tracking file and
SQL> ALTER DATABASE RENAME FILE ‘/tmp/blocktracking.f’ TO ‘/u01/oradata/TEST/blocktracking.f’;

# Move current block tracking file through OS
SQL> !mv /tmp/blocktracking.f /u01/oradata/TEST/blocktracking.f

# Open database
SQL> ALTER DATABASE OPEN;

Note: Recreating the file by using disable and creating it will not use until level 0 backup is run.

Leave a Reply