Practice Recovery - Messed up 2nd redo group
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Practice Recovery - Messed up 2nd redo group

  1. #1
    Join Date
    Dec 2001
    Location
    Keene, NH
    Posts
    510

    Practice Recovery - Messed up 2nd redo group

    I'm practicing recovery (this is not an emergency). Did an RMAN backup. (9.2 on Solaris)

    Originally:
    testdb:/d02/testdb> ls redo*
    redo01a.log
    redo01b.log
    redo02a.log
    redo02b.log

    I deleted all database files EXCEPT one control_01.ctl file and one redo01a.log
    I did an RMAN restore and recovery successfully.
    I created control_02.ctl from control_01.ctl
    I copied redo01a.log to redo01b.log
    I copied redo01a.log to redo02a.log from redo01a.log <-----This was where I went wrong !!

    The Problem:
    SQL> alter database open;
    alter database open
    *
    ERROR at line 1:
    ORA-00341: log 2 of thread 1, wrong log # in header
    ORA-00312: online log 2 thread 1: '/d02/testdb/redo02a.log'
    ORA-00312: online log 2 thread 1: '/d02/testdb/redo02b.log'

    testdb:/d02/testdb> oerr ora 341
    00341, 00000, "log %s of thread %s, wrong log # %s in header"
    // *Cause: The internal information in an online log file does not match the controlfile.
    // *Action: Restore correct file or reset logs.

    But the OPEN with RESETLOGS fails too:
    SQL> alter database open resetlogs;
    alter database open resetlogs
    *
    ERROR at line 1:
    ORA-01139: RESETLOGS option only valid after an incomplete database recovery

    So I cant restore redo02a.log and redo02b.log from anywhere or OPEN RESETLOGS because it's not an imcomplete recovery. What to do???

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    recover database until cancel;
    cancel;
    alter database open resetlogs;
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092

    Re: Practice Recovery - Messed up 2nd redo group

    Originally posted by gopi
    So I cant restore redo02a.log and redo02b.log from anywhere or OPEN RESETLOGS because it's not an imcomplete recovery. What to do???
    BTW, it is an incomplete recovery because you don't have all your redo logs up to current.
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  4. #4
    Join Date
    Dec 2001
    Location
    Keene, NH
    Posts
    510
    incomplete recovery completed....database OPEN !!!

    and...i did not lose any committed inserts because all the rows are all there. That must mean that redo01a/b where current when i crashed the database and deleted redo02a/b.

    Always Learning. Thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width