0

Oracle version = Oracle 8i (817_312) //Yes I know this is old.
Database id = LED
OS = Solaris 8
Oracle USERID = oraled
Oracle DBA group = dba

I an mot a DBA, but a UNIX/Linux System Administrator and I am testing a new backup solution. Our DBA was let go long time ago, and I was told to keep it running. We have not hired a new DBA yet.

I am trying to restore an older copy of the database from RMAN backups. I copied the control file from the full backup to the proper locations and then I started the restore. The "RESTORE" command completed successfully, but when I run the "RECOVER database;" I am getting a sequence number message error. I am restoring from a full backup, and the DB files and Control file were created by RMAN and saved to local disk. I am trying to do a point-in-time restore to when the full backup started.

Here are the commands I ran to do the restore:

$ setenv NLS_DATE_FORMAT "MM/DD/YYYY HH24:MI:SS"

$ rman nocatalog

RMAN> connect target sys/********@LED;

RMAN> startup mount;

RMAN> run {
2> set until time = '04/14/2018 00:00';   //midnight

3> allocate channel ch1 type disk;
4> allocate channel ch2 type disk;
5> allocate channel ch3 type disk;
6> allocate channel ch5 type disk;
7> allocate channel ch6 type disk;

8> restore database;
9> recover database;
10> }

--I trimmed out the files being restored------

RMAN-08024: channel ch3: restore complete

RMAN-03022: compiling command: recover

RMAN-03022: compiling command: recover(1)

RMAN-03022: compiling command: recover(2)

RMAN-03022: compiling command: recover(3)
RMAN-03023: executing command: recover(3)
RMAN-08054: starting media recovery
RMAN-08059: media recovery failed
RMAN-03026: error recovery releasing channel resources
RMAN-08031: released channel: ch1
RMAN-08031: released channel: ch2
RMAN-08031: released channel: ch3
RMAN-08031: released channel: ch5
RMAN-08031: released channel: ch6
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure during compilation of command
RMAN-03013: command type: recover
RMAN-03006: non-retryable error occurred during execution of command: recover(3)
RMAN-07004: unhandled exception during command execution on channel default
RMAN-10032: unhandled exception during execution of job step 1: ORA-00283: recovery session canceled due to errors
RMAN-11003: failure during parse/execution of SQL statement: alter database recover if needed start until time 'APR 14 2018 00:00:00'
RMAN-11001: Oracle Error: ORA-00283: recovery session canceled due to errors
ORA-00314: log 12 of thread 1, expected sequence# 211287 doesn't match 211311
ORA-00312: online log 12 thread 1: '/oracle/LED/origlogB/log_g12m1.dbf'
ORA-00314: log 12 of thread 1, expected sequence# 211287 doesn't match 211327
ORA-00312: online log 12 thread 1: '/oracle/LED/mirrlogB/log_g12m2.dbf'

Not sure what to do next. Any ideas?

Thanks for any help JimT

0

I believe the sequence error typically happens when the control file is out of sync with the archive logs up until the restore point.

EDIT: For future readers... The specific syntax in suggestions below pertain to version 10g and up.

You might try RESTORE CONTROLFILE before mounting the database. (Or RESTORE CONTROLFILE FROM AUTOBACKUP if not using a recovery catalog.) Another option is to specify the exact location of the controlfile you want to restore.

RMAN> STARTUP NOMOUNT;
RMAN> RESTORE CONTROLFILE FROM AUTOBACKUP
RMAN> ALTER DATABASE MOUNT;

Or

RMAN> STARTUP NOMOUNT;
RMAN> RESTORE CONTROLFILE FROM "/u03/flash_recovery_area/backup/cf_c-767783699-20170801-00"; 
RMAN> ALTER DATABASE MOUNT;

You should be able to find the exact path to the control file by running LIST BACKUP; in RMAN.

If that doesn't work, next thing I would try using either SCN or sequence number instead of the datetime for SET UNTIL

SET UNTIL SCN 1000;    

or

SET UNTIL SEQUENCE 211287;  
  • Thanks Mallory. Since we are not using a catalog I tried the RESTORE CONTROLFILE FROM AUTOBACKUP RMAN-03002: failure during compilation of command RMAN-03013: command type: restore RMAN-03002: failure during compilation of command RMAN-03013: command type: IRESTORE – Jim T Apr 27 '18 at 16:49
  • Oops, I forgot to mention that the db needs to be in nomount to run this (not sure in what state you tried it). Editing my answer.... – Mallorie Apr 27 '18 at 18:49
  • It was in nomount mode. I tried the RESTORE CONTROLFILE FROM AUTOBACKUP and i am getting this message: RESTORE CONTROLFILE FROM AUTOBACKUP RMAN-00569: =============== ERROR MESSAGE RMAN-00558: error encountered while parsing input commands RMAN-01005: syntax error: found "identifier": expecting one of: "tag" RMAN-01008: the bad identifier was: AUTOBACKUP – Jim T Apr 27 '18 at 21:57
  • It looks like this version of Oracle (8.1.7) doesn't support the AUTOBACKUP syntax.. – Jim T Apr 27 '18 at 22:04
  • Ah good to know, thanks. Oldest version I've used is 10g, with 12c being my forte. Hopefully one of the other options works for you. Good luck either way! – Mallorie Apr 27 '18 at 22:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.