Restore/Recovery of HOT full backup.
DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Restore/Recovery of HOT full backup.

  1. #1
    Join Date
    Nov 2003
    Posts
    4

    Angry Restore/Recovery of HOT full backup.


    First post to this board please be nice......

    I am having extreme difficulty recovering a database instance from a Hot,Full backup.
    For something that appears to be so simple is proving to be most difficult for some
    reason (yea, I know what you are thinking). Yes, it is true, I am new to
    Oracle and have no formal training at this point but I am working at it.
    Level of experience (Two Weeks).

    Please see below for a description of exactly what I am doing.


    **************************************************************************

    Facts:

    Oracle Version: Oracle Release 9.2.0.3.0
    OS : Linux 2.4.19-64GB-SMP
    Type of Backup: Full Hot Backup using RMAN of a DB in archivelog mode.





    Backup Script - begin



    cp $ORACLE_HOME/dbs/spfile${1}.ora /backup/${1}/

    connect target /;
    configure controlfile autobackup off;
    configure snapshot controlfile name to '/backup/${1}/snapcf_@.f';
    configure channel device type disk maxpiecesize 1g format = '/backup/${1}/bkup_%U';
    configure retention policy to redundancy 1;
    crosscheck backup;
    crosscheck archivelog all;
    backup full database plus archivelog;
    delete noprompt obsolete;
    list backup of database;
    exit;



    Backup Script - End



    After the backup is run, I verify and list the backup, here is some of the output:

    RMAN> list backup;


    List of Backup Sets
    ===================

    BS Key Type LV Size Device Type Elapsed Time Completion Time
    ------- ---- -- ---------- ----------- ------------ ---------------
    2 Full 337M DISK 00:02:20 11-NOV-03
    BP Key: 2 Status: AVAILABLE Tag: TAG20031111T110530
    Piece Name: /backup/nisc/bkup_02f65rfq_1_1
    List of Datafiles in backup set 2
    File LV Type Ckp SCN Ckp Time Name
    ---- -- ---- ---------- --------- ----
    2 Full 193369 11-NOV-03 /ora02/oradata/instanceTest/undotbs01.dbf
    3 Full 193369 11-NOV-03 /ora02/oradata/instanceTest/drsys01.dbf
    6 Full 193369 11-NOV-03 /ora02/oradata/instanceTest/users01.dbf
    8 Full 193369 11-NOV-03 /ora03/oradata/instanceTest/CIS01.dbf
    9 Full 193369 11-NOV-03 /ora04/oradata/instanceTest/CIS02.dbf

    BS Key Type LV Size Device Type Elapsed Time Completion Time
    ------- ---- -- ---------- ----------- ------------ ---------------
    3 Full 309M DISK 00:01:42 11-NOV-03
    BP Key: 3 Status: AVAILABLE Tag: TAG20031111T110530
    Piece Name: /backup/instanceTest/bkup_03f65rkc_1_1
    SPFILE Included: Modification time: 11-NOV-03
    List of Datafiles in backup set 3
    File LV Type Ckp SCN Ckp Time Name
    ---- -- ---- ---------- --------- ----
    1 Full 193487 11-NOV-03 /ora02/oradata/instanceTest/system01.dbf
    4 Full 193487 11-NOV-03 /ora02/oradata/instanceTest/indx01.dbf
    5 Full 193487 11-NOV-03 /ora02/oradata/instanceTest/tools01.dbf
    7 Full 193487 11-NOV-03 /ora02/oradata/instanceTest/xdb01.dbf
    10 Full 193487 11-NOV-03 /ora03/oradata/instanceTest/CIS03.dbf
    11 Full 193487 11-NOV-03 /ora04/oradata/instanceTest/CIST01.dbf
    12 Full 193487 11-NOV-03 /ora04/oradata/instanceTest/NISCSYS01.dbf

    BS Key Size Device Type Elapsed Time Completion Time
    ------- ---------- ----------- ------------ ---------------
    4 47K DISK 00:00:01 11-NOV-03
    BP Key: 4 Status: AVAILABLE Tag: TAG20031111T110944
    Piece Name: /backup/instanceTest/bkup_04f65rnp_1_1

    List of Archived Logs in backup set 4
    Thrd Seq Low SCN Low Time Next SCN Next Time
    ---- ------- ---------- --------- ---------- ---------
    1 11 193366 11-NOV-03 193568 11-NOV-03



    Everything appears to be included in the backup set.




    Restore procedures

    I then shutdown the instance and remove all files associated with the instance to simulate a major failure.

    The I begin the restore process which is as follows:








    RMAN> connect target /

    connected to target database (not started)

    RMAN> set DBID = 468787819;

    executing command: SET DBID

    RMAN> startup nomount;

    connected to target database (not started)
    Oracle instance started

    Total System Global Area 319886088 bytes

    Fixed Size 451336 bytes
    Variable Size 268435456 bytes
    Database Buffers 50331648 bytes
    Redo Buffers 667648 bytes

    RMAN> restore controlfile from "/backup/instanceTest/bkup_03f65rkc_1_1";

    Starting restore at 11-NOV-03

    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=8 devtype=DISK
    channel ORA_DISK_1: restoring controlfile
    channel ORA_DISK_1: restore complete
    replicating controlfile
    input filename=/ora01/oradata/instanceTest/control01.ctl
    output filename=/ora02/oradata/instanceTest/control02.ctl
    output filename=/ora03/oradata/instanceTest/control03.ctl
    Finished restore at 11-NOV-03

    RMAN> startup mount;

    database is already started
    database mounted

    RMAN> recover database;

    Starting recover at 11-NOV-03
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 11/11/2003 14:36:13
    RMAN-06094: datafile 1 must be restored


    I have tried every variation of this that I can possibly think of:
    I have tried restoring the snapshot control file and there seems
    to be no difference. I would appreciate any input on what I may be doing wrong from start to finish.
    Thanks in Advance,

    Jac

  2. #2
    Join Date
    Nov 2000
    Location
    Birmingham, UK
    Posts
    360
    RMAN> recover database;
    I'm havent had much to do with RMAN, but you are trying to recover the database without restoring the database.
    I think you can use the restore database; command in RMAN to restore your latest backup (i.e. copy all the datafiles etc from your backup). Then you need to do the recovery by using recover database;

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    You've never restored your database.

    Since you lost your control files, once you restore, you will have to recover using backup controlfile until your last valid log sequence number.
    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
    Nov 2003
    Posts
    4

    Unhappy

    Thank you Fraze and marist89. You are both very observant. I apologize for the oversight. I cut and pasted my details and must have lost the "restore database" clause.

    Based on what I am seeing in the backup listing, I should be able to just issue the following command, I think...

    restore database from tag=tagname;

    This fails when I attempt to do it with the following error:

    Starting restore at 12-NOV-03

    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 11/12/2003 11:58:55
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 12 found to restore
    RMAN-06023: no backup or copy of datafile 11 found to restore
    RMAN-06023: no backup or copy of datafile 10 found to restore
    RMAN-06023: no backup or copy of datafile 7 found to restore
    RMAN-06023: no backup or copy of datafile 5 found to restore
    RMAN-06023: no backup or copy of datafile 4 found to restore
    RMAN-06023: no backup or copy of datafile 1 found to restore

    For some reason rman is not recognizing Backup Set 3.


    In addition I also try to use the
    restore datafile integer;
    and that works fine as long as I only refer to those pieces in backup set 2. If I try to reference any pieces in backup set 3, I get the following error:

    Starting restore at 12-NOV-03

    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 11/12/2003 12:02:55
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 12 found to restore


    Again sorry for leaving out the restore portion of my description. I do appreciate your help.
    Thanks in Advance,

    Jac

  5. #5
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    how about just "RESTORE DATABASE;"
    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."

  6. #6
    Join Date
    Nov 2003
    Posts
    4
    RMAN complains some of the backup set is missing....
    Thanks in Advance,

    Jac

  7. #7
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    OK, and are those pieces on disk?
    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."

  8. #8
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    LIST BACKUP OF DATAFILE 1;

    [assume]
    You are using a recovery catalog.
    [/assume]
    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."

  9. #9
    Join Date
    Nov 2003
    Posts
    4

    Lightbulb

    Thanks so much for everyone's patience.

    To answer your question Jeff, I am not using a recovery catalog.

    I have a pretty good idea as to what is going on.

    My backup is running as follows:

    connect target /;
    configure controlfile autobackup off;
    configure snapshot controlfile name to '/backup/${1}/snapcf_@.f';
    configure channel device type disk maxpiecesize 1g format = '/backup/${1}/bkup_%U';
    configure retention policy to redundancy 1;
    crosscheck backup;
    crosscheck archivelog all;
    backup full database plus archivelog;
    delete noprompt obsolete;
    list backup of database;
    exit;

    Because the autobackup is off the control file which is backed up with datafile 1 is done at a point in time where the control file cannot possibly contain the recovery information for this backup.
    Thus the errors when trying to restore.

    My question is now, what is the appropriate method of backing up. My understanding of the snapshot is it allows the backup to maintain a consistent view of the instance as the backup is taking place, but again serves no purpose as an aid when doing a full restore, same reason as above. So is it best to run a snapshot and turn autobackup to on. I must confess, the backup was written by a formerly employeed dba and I am coming into this with very little experience. So any advice on this matter would be greatly appreciated.

    Once Again, thanks so much for your patience and willingness to help.
    Thanks in Advance,

    Jac

  10. #10
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    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."

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