Error:
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-38760: This database instance failed to turn on flashback database
Solution:
There are 2 possible solutions when a flashback log file was deleted manually:
(1) Turn off Flashback:
SQL> alter database flashback off;
After this turn the flashback on again if required.
SQL> alter database flashback on;
(2) In cases where "Guaranteed Restore Point" is defined, RVWR will still try to write to flashback log even though you have disable it and it will fail again with same error:
Check if flashback database is disable or not. When checked the flashback status after disabling flashback, it shows 'RESTORE POINT ONLY' instead of 'NO'.
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
RESTORE POINT ONLY
FLASHBACK_ON - possible values are as follows:
YES - Flashback is on
NO - Flashback is off
RESTORE POINT ONLY - Flashback is on but one can only flashback to guaranteed restore points
So the cause of the issue is Guaranteed Restore Point created on database.
The database would still try to write flashback data to the current flashback log because the database still has at least one Guaranteed Restore Point declared in the controlfile.
Find out the name of Guaranteed Restore Point and delete so that database would not try to write to flashback log on startup:
Now we have 3 options to know the restore point name:
2.1) Check the name from v$restore_point view but that would also fail with same error:
SQL> select * from v$restore_point;
SQL>select NAME,SCN,GUARANTEE_FLASHBACK_DATABASE,DATABASE_INCARNATION# from v$restore_point;
if this also error out.
2.2) Search for restore point name in alert log. In this case customer was purging alert log every year starting so could not find name for the Restore Point.
2.3) Dump the controlfile to get the restore point name:
SQL> oradebug setmypid
SQL> alter session set events 'immediate trace name controlf level 9';
SQL> oradebug tracefile_name
From trace file of controlfile dump, we could see below information:
RESTORE POINT #1:
restore point name: <restore point test> guarantee flag: 1 incarnation: 2next record 0 <<<< Name of restore point
Now we have name of Guaranteed Restore Point:
SQL> Drop restore point <restore point test>;
SQL> alter database open;
***This error may also occur if the FRA is full and thus a flashback log cannot be created. Check V$flash_recovery_area_usage and/or V$recovery_file_dest regarding space availability in FRA.
Reference doc id:
STARTUP Database failed ORA-38760 to turn on Flashback Database (Doc ID 1554596.1)
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-38760: This database instance failed to turn on flashback database
Solution:
There are 2 possible solutions when a flashback log file was deleted manually:
(1) Turn off Flashback:
SQL> alter database flashback off;
After this turn the flashback on again if required.
SQL> alter database flashback on;
(2) In cases where "Guaranteed Restore Point" is defined, RVWR will still try to write to flashback log even though you have disable it and it will fail again with same error:
Check if flashback database is disable or not. When checked the flashback status after disabling flashback, it shows 'RESTORE POINT ONLY' instead of 'NO'.
SQL> select flashback_on from v$database;
FLASHBACK_ON
------------------
RESTORE POINT ONLY
FLASHBACK_ON - possible values are as follows:
YES - Flashback is on
NO - Flashback is off
RESTORE POINT ONLY - Flashback is on but one can only flashback to guaranteed restore points
So the cause of the issue is Guaranteed Restore Point created on database.
The database would still try to write flashback data to the current flashback log because the database still has at least one Guaranteed Restore Point declared in the controlfile.
Find out the name of Guaranteed Restore Point and delete so that database would not try to write to flashback log on startup:
Now we have 3 options to know the restore point name:
2.1) Check the name from v$restore_point view but that would also fail with same error:
SQL> select * from v$restore_point;
SQL>select NAME,SCN,GUARANTEE_FLASHBACK_DATABASE,DATABASE_INCARNATION# from v$restore_point;
if this also error out.
2.2) Search for restore point name in alert log. In this case customer was purging alert log every year starting so could not find name for the Restore Point.
2.3) Dump the controlfile to get the restore point name:
SQL> oradebug setmypid
SQL> alter session set events 'immediate trace name controlf level 9';
SQL> oradebug tracefile_name
From trace file of controlfile dump, we could see below information:
RESTORE POINT #1:
restore point name: <restore point test> guarantee flag: 1 incarnation: 2next record 0 <<<< Name of restore point
Now we have name of Guaranteed Restore Point:
SQL> Drop restore point <restore point test>;
SQL> alter database open;
***This error may also occur if the FRA is full and thus a flashback log cannot be created. Check V$flash_recovery_area_usage and/or V$recovery_file_dest regarding space availability in FRA.
Reference doc id:
STARTUP Database failed ORA-38760 to turn on Flashback Database (Doc ID 1554596.1)
No comments:
Post a Comment