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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s