Flashback Database error [message #623332] |
Mon, 08 September 2014 13:05 |
Ricky_1362002
Messages: 111 Registered: February 2009
|
Senior Member |
|
|
Hi All,
I was trying to perform FLASHBACK DATABASE, but been getting an error.
/home/oracle[DEVEL3]$srvctl stop database -d DEVEL
/home/oracle[DEVEL3]$sqlplus '/as sysdba'
SQL*Plus: Release 11.2.0.3.0 Production on Mon Sep 8 10:28:07 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1.9241E+11 bytes
Fixed Size 2232512 bytes
Variable Size 1.4388E+11 bytes
Database Buffers 4.8318E+10 bytes
Redo Buffers 208666624 bytes
Database mounted.
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
--------- --------------------
DEVEL MOUNTED
SQL> SELECT OLDEST_FLASHBACK_SCN, OLDEST_FLASHBACK_TIME FROM V$FLASHBACK_DATABASE_LOG;
OLDEST_FLASHBACK_SCN OLDEST_FL
-------------------- ---------
1410673507 02-SEP-14
SQL> set time on timing on
10:35:00 SQL>
10:35:36 SQL>
10:35:46 SQL> FLASHBACK DATABASE TO TIMESTAMP TO_TIMESTAMP('2014-09-06 17:55:00', 'YYYY-MM-DD HH24:MI:SS');
FLASHBACK DATABASE TO TIMESTAMP TO_TIMESTAMP('2014-09-06 17:55:00', 'YYYY-MM-DD HH24:MI:SS')
*
ERROR at line 1:
ORA-38754: FLASHBACK DATABASE not started; required redo log is not available
ORA-38762: redo logs needed for SCN 1413790251 to SCN End-of-Redo
ORA-38761: redo log sequence 38 in thread 3, incarnation 2 could not be
accessed
Elapsed: 00:00:04.96
10:38:00 SQL> show parameter flashback
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_flashback_retention_target integer 2880
11:01:45 SQL> show parameter db_recover
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string +FRA_DG1
db_recovery_file_dest_size big integer 8192G
I have been getting this error for quite a while now. I am not sure why its looking for that redo.
Do I have to unregister that arch log from RMAN? and then try? Any ideas please, I have been struggling a lot on this.
Please advise.
Thank you,
Ricky
[Updated on: Mon, 08 September 2014 13:06] Report message to a moderator
|
|
|
|
|
|
|
Re: Flashback Database error [message #623338 is a reply to message #623337] |
Mon, 08 September 2014 15:18 |
Ricky_1362002
Messages: 111 Registered: February 2009
|
Senior Member |
|
|
That redo log, which the FLASHBACK operation is looking for, is quite old, about 1+ week old. I am doing the flashback to some 36 hours back. I am not really sure why it is looking for that.
Is there anyway to unregister that particular arch log from RMAN?
Would that affect the DB in any bad way?
I am kind of stuck here, please help.
|
|
|
|
|
Re: Flashback Database error [message #623341 is a reply to message #623338] |
Mon, 08 September 2014 16:49 |
John Watson
Messages: 8963 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Ricky_1362002 wrote on Mon, 08 September 2014 21:18That redo log, which the FLASHBACK operation is looking for, is quite old, about 1+ week old. I am doing the flashback to some 36 hours back. I am not really sure why it is looking for that.
Is there anyway to unregister that particular arch log from RMAN?
Would that affect the DB in any bad way?
I am kind of stuck here, please help. Flashback needs the older logs because the flashback logging mechanism does not capture every change. There will be at least one block where the closest version it has is that old, so it needs redo to recover it from then up to the time you have requested.
|
|
|
Re: Flashback Database error [message #623343 is a reply to message #623341] |
Mon, 08 September 2014 17:16 |
Ricky_1362002
Messages: 111 Registered: February 2009
|
Senior Member |
|
|
Thank you John.
I understand that those redo/arch logs are needed to perform "Flashback Database" but is there any other way that the flashback would work without those arch/redo logs?
The reason being, even when I restore the files, the flashback doesn't work. Am I missing something somewhere?
Please advise.
|
|
|
Re: Flashback Database error [message #623491 is a reply to message #623343] |
Wed, 10 September 2014 10:55 |
Ricky_1362002
Messages: 111 Registered: February 2009
|
Senior Member |
|
|
Quote:
Flashback needs the older logs because the flashback logging mechanism does not capture every change. There will be at least one block where the closest version it has is that old, so it needs redo to recover it from then up to the time you have requested.
So, I disabled flashback on monday, dropped all the restore points, waited for a while, and re-enabled the flashback again, assuming that this time 'flashback database' operation would work without looking for that old redo/arch log. But then again, I get the same error
08:34:31 SQL> select * from v$flashback_database_log;
OLDEST_FLASHBACK_SCN OLDEST_FL RETENTION_TARGET FLASHBACK_SIZE ESTIMATED_FLASHBACK_SIZE
-------------------- --------- ---------------- -------------- ------------------------
1415114071 08-SEP-14 2880 3.7581E+10 1.1621E+10
Elapsed: 00:00:06.07
08:34:53 SQL>
08:34:57 SQL> FLASHBACK DATABASE TO TIMESTAMP TO_TIMESTAMP('2014-09-08 18:22:00', 'YYYY-MM-DD HH24:MI:SS');
FLASHBACK DATABASE TO TIMESTAMP TO_TIMESTAMP('2014-09-08 18:22:00', 'YYYY-MM-DD HH24:MI:SS')
*
ERROR at line 1:
ORA-38754: FLASHBACK DATABASE not started; required redo log is not available
ORA-38762: redo logs needed for SCN 1415205845 to SCN End-of-Redo
ORA-38761: redo log sequence 38 in thread 3, incarnation 2 could not be
accessed
Elapsed: 00:00:02.95
so, the only way to make it work is to restore that arch file and then try the flashback?
|
|
|
Re: Flashback Database error [message #623492 is a reply to message #623491] |
Wed, 10 September 2014 11:25 |
|
Michel Cadot
Messages: 68731 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Michel Cadot wrote on Mon, 08 September 2014 21:42
ORA-38754: FLASHBACK DATABASE not started; required redo log is not available
*Cause: A FLASHBACK DATABASE command did not start. A redo log needed for
the recovery part of FLASHBACK DATABASE could not be found or
accessed.
*Action: See trace files for details of the problem.
ORA-38762: redo logs needed for SCN %s to SCN %s
*Cause: The FLASHBACK DATABASE operation failed. The recovery portion of
FLASHBACK DATABASE needed redo from the first SCN to the second,
but one or more of the redo logs in the range could not be read or
opened.
*Action: Check the FLASHBACK DATABASE command trace file for a
description of the inaccessible redo logs, restore access to
them, and retry the FLASHBACK DATABASE command.
ORA-38761: redo log sequence %s in thread %s, incarnation %s could not be accessed
*Cause: A redo log needed for the recovery portion of FLASHBACK could not
be read or opened. The FLASHBACK operation failed.
*Action: Restore the log and retry the FLASHBACK command.
Last line: *Action: Restore the log and retry the FLASHBACK command.
[Updated on: Wed, 10 September 2014 11:27] Report message to a moderator
|
|
|
Re: Flashback Database error [message #624445 is a reply to message #623492] |
Mon, 22 September 2014 16:16 |
Ricky_1362002
Messages: 111 Registered: February 2009
|
Senior Member |
|
|
Thank you everyone for your help.
Well, the problem was due to the fact that the resetlogs# in the v$archived_log and incarnations was not matching.
ReCreated the control file, enabled flashback, and it started working.
Thanks again.
Regards,
Ricky
|
|
|
|
Re: Flashback Database error [message #624466 is a reply to message #624445] |
Tue, 23 September 2014 01:56 |
John Watson
Messages: 8963 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
According to the docs, you violated one of the pre-requisites for database flashback:Quote:You are not trying to use FLASHBACK DATABASE to return to a point in time before the restore or re-creation of a control file. If the database control file is restored from backup or re-created, then all accumulated flashback log information is discarded. so do not assume that is repeatable behaviour. None-the-less, I hope the exercise was valuable.
|
|
|