Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2002
    Posts
    1,245

    Unanswered: Recover 9i Database Using RMAN

    Hello,

    I was practicing database recovery today using RMAN. I'm running 9.2.0.6 on a Windows 2003 machine and using a repository on another server. I'm okay with instance recovery, full recovery and recovery to a point in time. I'm having a bit of an issue with recovery if all data files and control files have been deleted/lost.

    Scenario:
    All datafiles, control files and log files have been lost. Only RMAN backups (on remote server) are available for recovery.

    Steps:
    (I cheat a bit here, I've started the Oracle Service already)
    1. SQL> startup nomount;
    2. RMAN> restore controlfile;
    3. SQL> alter database mount;
    4. RMAN> restore database;
    5. RMAN> recover database until sequence ### thread #;
    6. SQL> alter database open resetlogs;
    Step 5. is my question. It was easy today since I had just done a OPEN DATABASE RESETLOGS (incomplete recovery from previous scenario). I used recover database until SEQUENCE 0 THREAD 0.

    But how do I tell the correct sequence number to use in a production scenario? Do I get it from V$LOGFILE?

    Sorry, this is probably a dumb question, but I really didn't know.

    Regards,

    hmscott
    Have you hugged your backup today?

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool

    Quote Originally Posted by hmscott
    ...But how do I tell the correct sequence number to use in a production scenario? Do I get it from V$LOGFILE?

    If your database is down/destroyed/erased/kaput you cannot get the SCN from V$LOGFILE, you need to query the repository using the LIST command.

    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Jul 2003
    Posts
    2,296
    here's an easy way.
    once your database restore step has finished (#4), log in as sys and issue:
    recover database until cancel;

    oracle will then prompt you with the archive log it wants to apply.
    now cancel out of that and issue through rman to get the proper archive logs:
    restore archivelog from logseq [#SeqRmanGaveYou] until logseq [#AddAnother20];

    there you go.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  4. #4
    Join Date
    Dec 2002
    Posts
    1,245
    Quote Originally Posted by LKBrwn_DBA

    ... using the LIST command.
    Not sure why you needed to include the LKBrwn. I specifically stated that I had recovered the controlfiles (and the database) in the scenario.

    Regards,

    hmscott
    Have you hugged your backup today?

  5. #5
    Join Date
    Dec 2002
    Posts
    1,245
    Quote Originally Posted by The_Duck
    here's an easy way.
    once your database restore step has finished (#4), log in as sys and issue:
    recover database until cancel;

    oracle will then prompt you with the archive log it wants to apply.
    now cancel out of that and issue through rman to get the proper archive logs:
    restore archivelog from logseq [#SeqRmanGaveYou] until logseq [#AddAnother20];

    there you go.
    Okay; I'll try that. I'll add it to my crib sheet too.

    Thanks,

    hmscott
    Have you hugged your backup today?

  6. #6
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Quote Originally Posted by LKBrwn_DBA
    database is kaput

  7. #7
    Join Date
    May 2006
    Posts
    132
    Quote Originally Posted by hmscott
    Scenario:
    All datafiles, control files and log files have been lost. Only RMAN backups (on remote server) are available for recovery.
    You mention logs files lost, didn't know if you were assuming the alert log was lost too? If you still have access to the alert log, you can obtain the latest SCN from here too.

Posting Permissions

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