The following steps can be taken to address the “ORA-19751: could not create the change tracking file” error when attempting to open the database after completing RMAN restore and recovery:
Reproducing the error can be achieved by following the initial two steps, which will recover and attempt to open the database with the resetlogs option.
1. Perform media recovery on the newly restored database.
SQL> recover automatic database using backup controlfile until change 316985313307;
Media recovery complete.
2. When “alter database open resetlogs” is executed the below error is displayed due to BLOCK CHANGE TRACKING previously enabled on the source database.
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-19751: could not create the change tracking file
ORA-19750: change tracking file: '+DATA/TRACKING_FILE/block_change.bct'
ORA-17502: ksfdcre:4 Failed to create file
+DATA/TRACKING_FILE/block_change.bct
ORA-15173: entry 'XXX' does not exist in directory '/'
ORA-17503: ksfdopn:2 Failed to open file
+DATA/TRACKING_FILE/block_change.bct
ORA-15173: entry 'XXX' does not exist in directory '/'
3. Disable block change tracking on the database.
SQL>alter database disable BLOCK CHANGE TRACKING;
Database altered.
4. When “alter database open resetlogs” is executed, the below error is reported.
SQL>alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery
5. Open the database in read/write mode.
SQL> alter database open;
Database altered.
SQL>select name, open_mode from v$database;
NAME OPEN_MODE
XXX READ WRITE