Home » RDBMS Server » Backup & Recovery » Error recover database RMAN-06054 (Oracle 12c Release 2)
Error recover database RMAN-06054 [message #674463] Mon, 28 January 2019 12:48 Go to next message
petar97
Messages: 113
Registered: October 2018
Senior Member
I deleted the test database, and now I want to restore it back, when I try to recover the database I get this error. Everything I had at the database is there and everything works fine.

How can I fix this error?

unable to find archived log
archived log thread=1 sequence=2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 01/28/2019 11:49:40
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 2 and starting SCN of 422743
Re: Error recover database RMAN-06054 [message #674464 is a reply to message #674463] Mon, 28 January 2019 12:59 Go to previous messageGo to next message
Michel Cadot
Messages: 66728
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

If you hide what you have done (the complete script and RMAN answers) we can't help.

Re: Error recover database RMAN-06054 [message #674465 is a reply to message #674464] Mon, 28 January 2019 13:05 Go to previous messageGo to next message
petar97
Messages: 113
Registered: October 2018
Senior Member
[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Mon Jan 28 11:41:57 2019

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup mount exclusive restrict;
ORACLE instance started.

Database mounted.


SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
[oracle@localhost ~]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Mon Jan 28 11:42:53 2019

Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.

connected to target database: TESTDB (DBID=2781904941, not open)


RMAN> drop database noprompt;

database name is "TESTDB" and DBID is 2781904941
database dropped

RMAN> startup nomount

Oracle instance started

Total System Global Area    1073741824 bytes

Fixed Size                     8628936 bytes
Variable Size                671089976 bytes
Database Buffers             390070272 bytes
Redo Buffers                   3952640 bytes



RMAN> restore controlfile from autobackup;

Starting restore at 28-JAN-19
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=35 device type=DISK

output file name=/u01/app/oracle/oradata/testDB/data/testDB/control01.ctl
Finished restore at 28-JAN-19




RMAN> alter database mount;

Statement processed
released channel: ORA_DISK_1




RMAN> restore database;

Starting restore at 28-JAN-19
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
Finished restore at 28-JAN-19




RMAN> recover database;

Starting recover at 28-JAN-19
using channel ORA_DISK_1
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:15

starting media recovery

unable to find archived log
archived log thread=1 sequence=2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 01/28/2019 11:49:40
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 2 and starting SCN of 422743
Re: Error recover database RMAN-06054 [message #674466 is a reply to message #674465] Mon, 28 January 2019 13:15 Go to previous messageGo to next message
Michel Cadot
Messages: 66728
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

You need to provide the archived log RMAN requires (and the subsequent ones).
For this you need to catalog these ones using the CATALOG command to tell RMAN where they are.

Re: Error recover database RMAN-06054 [message #674467 is a reply to message #674466] Mon, 28 January 2019 13:23 Go to previous messageGo to next message
petar97
Messages: 113
Registered: October 2018
Senior Member
Database is in archivelog mode

SQL> select log_mode from v$database;
LOG_MODE
------------
ARCHIVELOG

For this istance I'dont use catalog, if I make a catalog, I do not know how to solve the problem
Re: Error recover database RMAN-06054 [message #674469 is a reply to message #674467] Mon, 28 January 2019 13:31 Go to previous messageGo to next message
Michel Cadot
Messages: 66728
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

If you catalog the archived logs RMAN will know them, you have nothing more to do.

Re: Error recover database RMAN-06054 [message #674472 is a reply to message #674467] Mon, 28 January 2019 14:55 Go to previous messageGo to next message
EdStevens
Messages: 1148
Registered: September 2013
Senior Member
petar97 wrote on Mon, 28 January 2019 13:23
Database is in archivelog mode

SQL> select log_mode from v$database;
LOG_MODE
------------
ARCHIVELOG

For this istance I'dont use catalog, if I make a catalog, I do not know how to solve the problem

You are confusing the use of the rman command CATALOG with the use of an rman catalog database.

https://docs.oracle.com/database/121/RCMRF/rcmsynta007.htm#RCMRF109

Re: Error recover database RMAN-06054 [message #674481 is a reply to message #674463] Tue, 29 January 2019 06:09 Go to previous messageGo to next message
petar97
Messages: 113
Registered: October 2018
Senior Member
After this command I get same error, with different SCN
RMAN> catalog start with '/u01/app/oracle/fast_recovery_area/testDB/TESTDB';

searching for all files that match the pattern /u01/app/oracle/fast_recovery_area/testDB/TESTDB
no files found to be unknown to the database


RMAN> catalog archivelog '/u01/app/oracle/fast_recovery_area/testDB/TESTDB/archivelog/2019_01_28/o1_mf_1_1_g4xxr2js_.arc';

cataloged archived log
archived log file name=/u01/app/oracle/fast_recovery_area/testDB/TESTDB/archivelog/2019_01_28/o1_mf_1_1_g4xxr2js_.arc RECID=6 STAMP=998808404

RMAN> catalog archivelog '/u01/app/oracle/fast_recovery_area/testDB/TESTDB/archivelog/2019_01_28/o1_mf_1_1_g4yldwbl_.arc';

cataloged archived log
archived log file name=/u01/app/oracle/fast_recovery_area/testDB/TESTDB/archivelog/2019_01_28/o1_mf_1_1_g4yldwbl_.arc RECID=7 STAMP=998808434

RMAN> catalog archivelog '/u01/app/oracle/fast_recovery_area/testDB/TESTDB/archivelog/2019_01_26/o1_mf_1_12_g4sn9xn1_.arc';

cataloged archived log
archived log file name=/u01/app/oracle/fast_recovery_area/testDB/TESTDB/archivelog/2019_01_26/o1_mf_1_12_g4sn9xn1_.arc RECID=8 STAMP=998808488


 
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 1 and starting SCN of 628257

Re: Error recover database RMAN-06054 [message #674482 is a reply to message #674481] Tue, 29 January 2019 06:53 Go to previous messageGo to next message
petar97
Messages: 113
Registered: October 2018
Senior Member
It works like this, but I don't know if it's right

recover database until sequence 1;


SQL> select sequence# from v$archived_log;

 SEQUENCE#
----------
	11
	12
	 1
	11
	 1
	12

[Updated on: Tue, 29 January 2019 07:00]

Report message to a moderator

Re: Error recover database RMAN-06054 [message #674483 is a reply to message #674482] Tue, 29 January 2019 07:37 Go to previous messageGo to next message
John Watson
Messages: 8085
Registered: January 2010
Location: Global Village
Senior Member
When you dropped the database, you dropped the spfile. Therefore your next startup will have used an old pfile that just happened to be in the correct location with an appropriate name. More than likely that is causing the hassles you have now. You need to extract the genuine spfile from your autobackup, and start an instance off that before trying to restore a controlfile.
Re: Error recover database RMAN-06054 [message #674485 is a reply to message #674483] Tue, 29 January 2019 07:57 Go to previous messageGo to next message
petar97
Messages: 113
Registered: October 2018
Senior Member
RMAN> restore spfile from autobackup;

Starting restore at 29-JAN-19
using channel ORA_DISK_1

recovery area destination: /u01/app/oracle/fast_recovery_area/testDB
database name (or database unique name) used for search: TESTDB
channel ORA_DISK_1: no AUTOBACKUPS found in the recovery area
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20190129
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20190128
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20190127
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20190126
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20190125
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20190124
channel ORA_DISK_1: looking for AUTOBACKUP on day: 20190123
channel ORA_DISK_1: no AUTOBACKUP in 7 days found
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 01/29/2019 09:00:50
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece

[Updated on: Tue, 29 January 2019 08:01]

Report message to a moderator

Re: Error recover database RMAN-06054 [message #674493 is a reply to message #674485] Tue, 29 January 2019 13:15 Go to previous messageGo to next message
petar97
Messages: 113
Registered: October 2018
Senior Member
I managed to restore the spfile back but I get the same mistake
Re: Error recover database RMAN-06054 [message #674494 is a reply to message #674493] Tue, 29 January 2019 14:26 Go to previous messageGo to next message
John Watson
Messages: 8085
Registered: January 2010
Location: Global Village
Senior Member
I do not understand. You posted details showing that you did not restore an spile, and then you say that you did.

This is obviously nothing more than some test or training database. Forget it. Create a new one.
Re: Error recover database RMAN-06054 [message #674495 is a reply to message #674494] Tue, 29 January 2019 14:35 Go to previous messageGo to next message
petar97
Messages: 113
Registered: October 2018
Senior Member
Now I've made a new database.
For the first time I did not get it back, later I did.
Re: Error recover database RMAN-06054 [message #674513 is a reply to message #674495] Wed, 30 January 2019 09:19 Go to previous message
petar97
Messages: 113
Registered: October 2018
Senior Member
Works well now, thanks for the advice.

RMAN> restore database until sequence 3;

Starting restore at 30-jan-2019 06:26:14
using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/testDB/TESTDB/backupset/2019_01_30/o1_mf_nnnd0_TAG20190130T061336_g531q106_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/testDB/TESTDB/backupset/2019_01_30/o1_mf_nnnd0_TAG20190130T061336_g531q106_.bkp tag=TAG20190130T061336
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:01:25
Finished restore at 30-jan-2019 06:27:41

RMAN> recover database until sequence 3;

Starting recover at 30-jan-2019 06:27:54
using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 2 is already on disk as file /u01/app/oracle/fast_recovery_area/testDB/TESTDB/archivelog/2019_01_30/o1_mf_1_2_g531rg42_.arc
archived log file name=/u01/app/oracle/fast_recovery_area/testDB/TESTDB/archivelog/2019_01_30/o1_mf_1_2_g531rg42_.arc thread=1 sequence=2
media recovery complete, elapsed time: 00:00:00
Finished recover at 30-jan-2019 06:27:56

RMAN> alter database open resetlogs;

[Updated on: Wed, 30 January 2019 09:25]

Report message to a moderator

Previous Topic: Flashback logs and guranteed restore point
Next Topic: RMAN Restore
Goto Forum:
  


Current Time: Sat Dec 14 17:57:57 CST 2019