DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: When do you need to "alter database open resetlogs"?

  1. #1
    Join Date
    Mar 2001
    Posts
    287
    This a recovery test. I dropped all control files and all datafiles while the db is up and running. Then, I use rman to do the following restore and recovery. As fas as I know, as long as you have all archived logs and online redo logs, you can recover and open the database without "resetlogs." Why does this one require me to "resetlogs"?

    run {
    allocate channel tape1 type 'sbt_tape';
    allocate channel tape2 type 'sbt_tape';
    restore controlfile;
    alter database mount;
    restore database;
    recover database;
    sql "ALTER DATABASE OPEN";
    release channel tape1;
    release channel tape2;
    }

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    if it's noarchive log then you do resetlogs after restoring cold backup

    if it's archive log since you got rid of all control files you have to recover with until ... command, which is equivalent to an imcomplete recovery and an incomplete recovery requires resetlogs

  3. #3
    Join Date
    Mar 2001
    Posts
    287
    Does this mean:

    Once you lose ALL control files, it's REQUIRED to open resetlogs.

    Please advise. Thank you!

  4. #4
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Indirectly, yes.

    You must use RESETLOGS when you do an incomplete recovery. By losing the controlfiles, you either have to recover with a backup controlfile or re-create your controlfiles, effectively requiring you to do an incomplete recovery.

    Jeff Hunter

  5. #5
    Join Date
    Aug 2000
    Posts
    462
    It is correct that any incomplete recovery requires OPEN RESETLOGS. It may help to think of it like this:

    Oracle must be able to synchronize the SCNs of all data files with the control file(s). If that cannot be done, due to missing control files which must be recreated, or missing data files which must be restored to a prior point in time, then resetlogs will be necessary, to allow Oracle to sync the control/data files again.

    Hope this helps.

    Oracle DBA and Developer

  6. #6
    Join Date
    Mar 2001
    Posts
    287
    What if I lost ALL control files but still have ALL on-line redo logs? In this case, I have all redo records in the on-line redo logs so I should be able to do a "complete recovery" and sync all data files. Why should I resetlogs?

    Remember, resetlogs means reset the log sequence number not the SCN.

  7. #7
    Join Date
    Aug 2001
    Posts
    147
    Originally posted by dba_admin
    What if I lost ALL control files but still have ALL on-line redo logs? In this case, I have all redo records in the on-line redo logs so I should be able to do a "complete recovery" and sync all data files. Why should I resetlogs?

    Remember, resetlogs means reset the log sequence number not the SCN.
    you don't have to do resetlogs if you have all your online logs plus archived logs. The only you time would perform resetlog is when you do incomplete recovery.

  8. #8
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    if you do it manually you probably dont have to resetlogs but since you are using RMAN I am not so sure that's why I dont use RMAN

    Ands yes we know resetlogs resets the sequence, you cannot reset SCN in a database

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