Rman scenario

Hai all,
Am planning to use the following commands for my complete DB Backup .. Can I rely on this alone ?
CROSSCHECK ARCHIVELOG ALL;
CROSSCHECK BACKUP;
Report obsolete;
Delete noprompt obsolete device type disk;
Delete noprompt expired backup;
backup check logical database plus archivelog delete input;
LIST backup BY File;
restore database validate;
Any ideas ?
Kai

Hi,
Can I rely on this alone?
that depends.
backing up a database with RMAN is Oracles recommended approach. However backing up a database is easy.
Restoring a database is much more interesting. I would recommend trying this backup approach and then try restoring it on a test database.
regards
Alan

Similar Messages

  • Dbid lost ...

    Hi,
    I am testing some recovery(using RMAN) Scenarios, if i lost my dbid then how i can find it. I am using nocatalog.
    Regards,

    actually i have all backup files of rman nothing more... so now i am at recovery, i cant start database, as i have to set its dbid first... then i can face nomount, mount, resetlogs and open mode. so i wouldn't be able to query v$ views.

  • Recover tablespace is failing and not able to open database

    Hello All,
    I am using Oracle RAC 11g R2 on Linux. My database is running in NOARHIVELOG mode.
    I am testing some RMAN scenarios.
    After doing a the below scenario: I think the problem that I used switch log file!!!
    RMAN> backup tablespace 'USERS' TAG 'TestBkp_FRA';
    RMAN> backup backupset 10 format '/testasm/backup%U' delete input; -- here 10 is the backup set generated in the previous command
    RMAN> BACKUP INCREMENTAL LEVEL 1 tablespace users;
    alter system switch logfile;-- many times i am not able to recover my users tablespace because of the below :
    archived log for thread 1 with sequence 19 is already on disk as file +DATA/orcl/onlinelog/group_1.261.772044543
    archived log for thread 1 with sequence 20 is already on disk as file +DATA/orcl/onlinelog/group_2.262.772044547
    archived log for thread 2 with sequence 4 is already on disk as file +DATA/orcl/onlinelog/group_4.266.772044919
    RMAN-08187: WARNING: media recovery until SCN 1101381 complete
    Finished recover at 27-MAR-2012 17:21:36and I am unable to open my database:
    RMAN> alter database open;             
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of alter db command at 03/27/2012 17:26:18
    ORA-01113: file 4 needs media recovery
    ORA-01110: data file 4: '+DATA/orcl/datafile/users.259.772044111'below is a list of my backups
    RMAN> list backup;
    List of Backup Sets
    ===================
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
    9       Full    1.45M      DISK        00:00:02     27-MAR-2012 12:06:47
            BP Key: 11   Status: AVAILABLE  Compressed: NO  Tag: TESTBKP
            Piece Name: /testasm/backup0an6tvil_1_2
      List of Datafiles in backup set 9
      File LV Type Ckp SCN    Ckp Time             Name
      4       Full 1092418    27-MAR-2012 11:40:06 +DATA/orcl/datafile/users.259.772044111
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
    10      Full    1.45M      DISK        00:00:04     27-MAR-2012 15:58:54
            BP Key: 13   Status: AVAILABLE  Compressed: NO  Tag: TESTBKP_FRA
            Piece Name: /testasm/backup0bn6ud5q_1_2
      List of Datafiles in backup set 10
      File LV Type Ckp SCN    Ckp Time             Name
      4       Full 1100603    27-MAR-2012 15:53:40 +DATA/orcl/datafile/users.259.772044111
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
    11      Incr 0  1.45M      DISK        00:00:05     27-MAR-2012 16:16:59
            BP Key: 14   Status: AVAILABLE  Compressed: NO  Tag: TAG20120327T161652
            Piece Name: +FRA/orcl/backupset/2012_03_27/nnndn0_tag20120327t161652_0.261.779041015
      List of Datafiles in backup set 11
      File LV Type Ckp SCN    Ckp Time             Name
      4    0  Incr 1101381    27-MAR-2012 16:13:11 +DATA/orcl/datafile/users.259.772044111
    BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
    12      Full    1.45M      DISK        00:00:02     27-MAR-2012 17:00:26
            BP Key: 15   Status: AVAILABLE  Compressed: NO  Tag: TAG20120327T170023
            Piece Name: +FRA/orcl/backupset/2012_03_27/nnndf0_tag20120327t170023_0.260.779043625
      List of Datafiles in backup set 12
      File LV Type Ckp SCN    Ckp Time             Name
      4       Full 1101381    27-MAR-2012 16:13:11 +DATA/orcl/datafile/users.259.772044111My database is running in NOARCHIVELOG mode I have no Full database backup.
    How can I start my database. Please help!!

    NB wrote:
    What do you mean ?
    Now I am not able to open my database. it is mounted.
    What steps should i do ?If you try to backup database in NOARCHIVELOG mode, you will get below errors
    RMAN> backup database;
    Starting backup at 27-MAR-12
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=130 device type=DISK
    channel ORA_DISK_1: starting full datafile backup set
    channel ORA_DISK_1: specifying datafile(s) in backup set
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/27/2012 20:30:26
    ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
    RMAN>
    RMAN> backup tablespace users;
    Starting backup at 27-MAR-12
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting full datafile backup set
    channel ORA_DISK_1: specifying datafile(s) in backup set
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/27/2012 20:30:58
    ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
    RMAN>Can you tell me how you took backup? have you taken backup from MOUNT status when its in noarchivelog mode?
    If there is inconsistency of SCN, you cant recover it.
    Please describe how you took backup & why you want to perform recovery in noarchivelog mode?

  • Isg_scenarios

    Hi
    Plz provide me the various rman scenarios complete and incomplete recovery link
    Regards
    Lucky

    Information on how to backup and restore using rman is in the Oracle manuals. You can find them at tahiti.oracle.com
    You can also search this forum, and search the internet with google.

  • A RMAN RECOVERY SCENARIO

    hellow,
    I am working on a rman recovery scenario as follows:
    ---I have a full backup on sunday
    ---My database in archivelog mode
    ---now I lost one of table on Monday 7:20PM
    ---then I lost another table on same day at 7:40PM
    ---I came to know about this(both table drop incident) at 7:45PM same day
    ---Now I have to recover both the tables
    ---I have catalog database configured
    please tell me step by step, how the recovery should be done?
    And I also want to know where I can find such scenarios on which I can work any book or web resource?

    This is an abstract of http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/flashptr006.htm#sthref651
    DBPITR within the current incarnation is performed using the current control file. When performing DBPITR, you can avoid errors by using the SET UNTIL command to set the target time at the beginning of the process, rather than specifying the UNTIL clause on the RESTORE and RECOVER commands individually. This ensures that the datafiles restored from backup will have timestamps early enough to be used in the subsequent RECOVER operation.
    The steps required for DBPITR are as follows:
    Connect RMAN to the target database and, if applicable, the recovery catalog database. Bring the database to a MOUNT state:
    SHUTDOWN IMMEDIATE;
    STARTUP MOUNT;
    Perform the following operations within a RUN block:
    Use SET UNTIL to specify the target time, restore point, SCN, or log sequence number for DBPITR. If specifying a time, then use the date format specified in the NLS_LANG and NLS_DATE_FORMAT environment variables.
    If automatic channels are not configured, then manually allocate disk and tape channels as needed.
    Restore and recover the database.
    The following example performs DBPITR on the target database until SCN 1000:
    RUN
    SET UNTIL SCN 1000;
    # Alternatives:
    # SET UNTIL TIME 'Nov 15 2004 09:00:00';
    # SET UNTIL SEQUENCE 9923;
    RESTORE DATABASE;
    RECOVER DATABASE;
    Note:
    You can also use time expressions, restore points, or log sequence numbers to specify the SET UNTIL time:
    SET UNTIL TIME 'Nov 15 2004 09:00:00';
    SET UNTIL SEQUENCE 9923;
    SET UNTIL RESTORE POINT before_update;
    If the operation completes without errors, then your DBPITR has succeeded. You can open the database read-only and perform queries as needed to ensure that the effects of the logical corruption have been reversed. If not, you may have chosen the wrong target SCN. In such a case, investigate the unwanted change further and determine a new target SCN, then repeat the DBPITR process.
    7.6.4.1 Using a Time Expression for Database Point-in-Time Recovery
    You can use a time expression instead of the SCN in the SET UNTIL statement, as shown in the preceding example. However, note that if you use SET UNTIL TIME to specify the target time for point-in-time recovery, some times that you can specify may not be in the current incarnation. The database may have been in an ancestor incarnation, or even in a sibling incarnation, at the target time. If your target time is not in the current incarnation, then see "Point-in-Time Recovery to an Ancestor Incarnation" for more information on DBPITR to ancestor incarnations, and Oracle Database Backup and Recovery Advanced User's Guide for more information on DBPITR to incarnations that are not ancestors of the current incarnation.
    7.6.5 Options After Database Point-in-Time Recovery
    After a successful DBPITR, your choices are:
    Export one or more objects from your database using an Oracle export utility such as Data Pump Export. You can then recover the database to the current point in time and re-import the exported objects, as a way to return these objects to their state prior to the unwanted change without abandoning all other changes.
    Open your database for read-write, abandoning all changes after the target SCN. In such a case, you must open the database with the RESETLOGS option, as shown here:
    RMAN> ALTER DATABASE OPEN RESETLOGS;
    The current online redo logs are archived, the log sequence number is reset to 1, and the online redo logs are given a new time stamp and SCN. Identifying redo log files with a new log sequence number and incarnation eliminates the possibility of corrupting datafiles by the application of obsolete archived redo logs.
    The OPEN RESETLOGS operation will fail if a datafile is off-line, unless the datafile went offline normally or is read-only. You can bring files in read-only or offline normal tablespaces online after the RESETLOGS because they do not need any redo.
    Sybrand Bakker
    Senior Oracle DBA

  • RMAN restore scenario

    I am not using catalog. control file record set to 31days but retain only 1 full backup in disk.
    took a backup on 23-may which got deleted from disk as of 28-may. all archive logs taken on 23-may got deleted from disk as well.
    Goal : I want to restore validate for 23-may.
    I restored the files from tape (both image copies and archive logs).
    rman doesn't recognize the archive logs. What is needed to make rman recognize the files restored from tape.
    Thanks

    Thanks for all your replies. At first I want to validate the backups taken on 23-may and make sure they are recoverable.
    rman shows 27-may , 28-may backup as recoverable and archivelogs dated on 27-may and 28-may
    RMAN> list backup recoverable;
    using target database control file instead of recovery catalog
    List of Backup Sets
    ===================
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    18 Full 7.08M DISK 00:00:01 27-MAY-08
    BP Key: 18 Status: AVAILABLE Compressed: NO Tag: TAG20080527T175134
    Piece Name: /orabackup/boepcm/rman/online/c-3049278399-20080527-01
    Control File Included: Ckp SCN: 462524 Ckp time: 27-MAY-08
    SPFILE Included: Modification time: 26-MAY-08
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    19 Full 7.08M DISK 00:00:01 28-MAY-08
    BP Key: 19 Status: AVAILABLE Compressed: NO Tag: TAG20080528T175117
    Piece Name: /orabackup/boepcm/rman/online/c-3049278399-20080528-00
    Control File Included: Ckp SCN: 501491 Ckp time: 28-MAY-08
    SPFILE Included: Modification time: 28-MAY-08
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    20 Full 7.08M DISK 00:00:00 28-MAY-08
    BP Key: 20 Status: AVAILABLE Compressed: NO Tag: TAG20080528T175136
    Piece Name: /orabackup/boepcm/rman/online/c-3049278399-20080528-01
    Control File Included: Ckp SCN: 501519 Ckp time: 28-MAY-08
    SPFILE Included: Modification time: 28-MAY-08
    RMAN> list archivelog all;
    List of Archived Log Copies
    Key Thrd Seq S Low Time Name
    61 1 51 A 27-MAY-08 /orabackup/boepcm/rman/online/arch_D-BOEPCM_id-3049278399_S-51_T-1_A-655222143_2tjhh9d1
    62 1 52 A 27-MAY-08 /orabackup/boepcm/rman/online/arch_D-BOEPCM_id-3049278399_S-52_T-1_A-655222143_2ujhh9d3
    58 1 53 A 27-MAY-08 /orabackup/boepcm/rman/online/arch_D-BOEPCM_id-3049278399_S-53_T-1_A-655222143_2qjhh9co
    59 1 54 A 27-MAY-08 /orabackup/boepcm/rman/online/arch_D-BOEPCM_id-3049278399_S-54_T-1_A-655222143_2rjhh9ct
    60 1 55 A 28-MAY-08 /orabackup/boepcm/rman/online/arch_D-BOEPCM_id-3049278399_S-55_T-1_A-655222143_2sjhh9cv
    63 1 56 A 28-MAY-08 /orabackup/boepcm/rman/online/arch_D-BOEPCM_id-3049278399_S-56_T-1_A-655222143_2vjhh9d6
    64 1 57 A 28-MAY-08 /var/opt/oracle/oradata/boepcm/arch/arch_1_57_655222143.arc
    65 1 58 A 28-MAY-08 /var/opt/oracle/oradata/boepcm/arch/arch_1_58_655222143.arc
    Recovery Manager complete.
    $
    here are the files that has be restored from tape that belongs to may 23. It has datafiles, arch files, control file and spfile. how do I make these files rman aware of it and then validate it
    $ ll
    total 3259250
    -rw-r----- 1 oracle dba 17454080 May 23 10:34 arch_D-BOEPCM_id-3049278399_S-30_T-1_A-655222143_0bjh17b8
    -rw-r----- 1 oracle dba 17184768 May 23 10:34 arch_D-BOEPCM_id-3049278399_S-31_T-1_A-655222143_0cjh17ba
    -rw-r----- 1 oracle dba 11603968 May 23 10:34 arch_D-BOEPCM_id-3049278399_S-32_T-1_A-655222143_0djh17bf
    -rw-r----- 1 oracle dba 2048 May 23 10:34 arch_D-BOEPCM_id-3049278399_S-33_T-1_A-655222143_0ejh17bh
    -rw-r----- 1 oracle dba 7143424 May 23 10:34 c-3049278399-20080522-04
    -rw-r----- 1 oracle dba 7143424 May 23 10:34 c-3049278399-20080522-05
    -rw-r----- 1 oracle dba 7143424 May 23 10:34 c-3049278399-20080522-06
    -rw-r----- 1 oracle dba 7143424 May 23 10:34 c-3049278399-20080523-00
    -rw-r----- 1 oracle dba 209723392 May 23 10:34 data_D-BOEPCM_I-3049278399_TS-BOE_DATA_FNO-4_08jh17a3
    -rw-r----- 1 oracle dba 209723392 May 23 10:35 data_D-BOEPCM_I-3049278399_TS-BOE_DATA_FNO-4_0ijh395r
    -rw-r----- 1 oracle dba 125837312 May 23 10:35 data_D-BOEPCM_I-3049278399_TS-SYSAUX_FNO-3_09jh17ai
    -rw-r----- 1 oracle dba 125837312 May 23 10:35 data_D-BOEPCM_I-3049278399_TS-SYSAUX_FNO-3_0jjh396k
    -rw-r----- 1 oracle dba 251666432 May 23 10:35 data_D-BOEPCM_I-3049278399_TS-SYSTEM_FNO-1_06jh178q
    -rw-r----- 1 oracle dba 251666432 May 23 10:35 data_D-BOEPCM_I-3049278399_TS-SYSTEM_FNO-1_0gjh3948
    -rw-r----- 1 oracle dba 209723392 May 23 10:35 data_D-BOEPCM_I-3049278399_TS-UNDO_TS_FNO-2_07jh179k
    -rw-r----- 1 oracle dba 209723392 May 23 10:35 data_D-BOEPCM_I-3049278399_TS-UNDO_TS_FNO-2_0hjh3952
    -rw-r--r-- 1 oracle dba 499 May 23 10:35 rman_hb_boepcm052220081525.log
    -

  • RMAN: restore scenario failed

    Hi!
    The problem occur when trying to restore original database on another test server
    Original server - Windows 2008 x64bit, Oracle Database *10.2.0.5* w/o patch,ASM configured.
    Database - Archivelog mode. RMAN performs weekly database incremental level 0 backup, daily level 1 backup.
    Contorl file backup occurs immediately after incremental level 0/1 database backup
    The backup incremental level 0 RMAN copy restoing on:
    Server - Windows 2008 x32bit, Oracle Database *10.2.0.5* w/o patch, ASM configured
    input Data "on hands":
    - Incremental level 0 database backup (Chkpt SCN 2978611044)
    - Control file backup (controlfile_change# 2988231505 , checkpoint change# 2987947892)
    - There is no oracle datafiles on test server, only instance started with appropriate parameters (SPFILE);
    0) start instance
    1) Restoring control file from backup (appropriate dbid has been set)
    2) mount database
    3) Crosscheck backup,archivelog..
    4) delete expired backup,archivelog..
    5) catalog backuppiece with incremental level 0 backup
    6) "list backup" command display contents of backuppiece with all datafiles (Chkpt SCN 2978611044)
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    589 Incr 0 35.59G DISK 02:13:31 07-MAR-11
    BP Key: 597 Status: AVAILABLE Compressed: YES Tag: INCREMENTAL LEVEL 0 BACKUP
    Piece Name: C:\BACKUP\DB0_EMCOR_1814183562_20110311_589_1_IDM6JCIS.BKP
    List of Datafiles in backup set 589
    File LV Type Ckp SCN Ckp Time Name
    1 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/system.262.732897467
    2 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/undotbs1.271.732882203
    3 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/sysaux.260.732896913
    4 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/undotbs2.272.732882195
    5 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/emcos_tab.274.732882177
    6 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/emcos_tab.278.732882143
    7 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/emcos_tab.261.732897211
    8 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/emcos_tab.277.732882151
    9 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/emcos_tab.276.732882159
    10 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/emcos_tab.275.732882169
    11 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/emcos_ind.269.732888789
    12 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/emcos_ind.268.732890649
    13 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/emcos_ind.267.732891909
    14 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/emcos_ind.258.732895369
    15 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/emcos_ind.259.732895663
    16 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/emcos_ind.266.732892429
    17 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/usertbsp.264.732897773
    18 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/emcos_ind.265.732893801
    19 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/emcos_tab.270.732887581
    20 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/system.263.732897753
    21 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/emcos_tab.273.732882187
    22 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/emcos_ind.257.732894149
    23 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/emcos_tab.295.734795693
    24 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/emcos_tab.297.736591245
    25 0 Incr 2978611044 07-MAR-11 +DATA/emcor/datafile/emcos_ind.298.736593189
    7) restore database validate
    RMAN-03002: failure of restore command at 03/16/2011 15:35:42
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 25 found to restore
    RMAN-06023: no backup or copy of datafile 1 found to restore
    8) list incarnation of database
    List of Database Incarnations
    DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
    1 1 EMCOR 1814183562 PARENT 1577251660 06-OCT-10
    2 2 EMCOR 1814183562 CURRENT 1578030113 09-OCT-10
    3 3 EMCOR 1814183562 ORPHAN 1578047894 20-OCT-10
    So, the DBPITR not possible.
    I've tried to restore on windows 2008 x64 - result is the same.

    According to the SCNs your backups (controlfile,datafiles) belong to orphaned incarnation 3, NOT current incarnation 2. But you run the restore process in incarnation 2.
    There was obviously a point in time recovery with resetlogs to 09-OCT-10 (Reset_SCN 1578030113), but you want to restore to SCN 2978611044.
    Try
    reset database to incarnation 3;
    Werner

  • Interesting scenario, is there a need to reset logs periodically?

    10.2.0.2 Ent Ed -- Rman 10.2.0.2 -- aix 5.3
    Is there a possible need to perform a reset logs periodically? This question initially came to me at the worst of times, during a recovery of a fairly important database.
    If / when you have to perform an spfile or controlfile restore without a recovery catalog, if your log sequence is above 255 and your last backup was more than a day ago, is it possible your latest autobackup wont be found? In our scenario we had a day old controlfile snapshot that we used, but I'm not sure if we would have been able to recover had it not been there. From reading the 10g Recovery Manager Reference manual:
    "FROM AUTOBACKUP
    [autoBackupOptionList]
    Restores a control file autobackup. You can only specify this option on the RESTORE CONTROLFILE and RESTORE SPFILE commands. When restoring either type of file in NOCATALOG mode, the FROM AUTOBACKUP clause is required.
    RMAN begins the search on the current day or on the day specified with the SET UNTIL. If no autobackup is found in the current or SET UNTIL day, RMAN checks the previous day starting with sequence 256 (or the sequence specified by MAXSEQ) until it reaches 0. The search continues up to MAXDAYS days (default of 7, maximum of 366) from the current or SET UNTIL day. If no autobackup is found within MAXDAYS days, then RMAN signals an error and the command stops. "
    The doc doesn't mention it but if you haven't ever tried setting MAXSEQ > 256, you'll get an error if you do. 256 is the upper bound for the MAXSEQ parameter. This is a snippet from my test of that:
    <code>
    oracle_sandbox1> rman target /
    Recovery Manager: Release 10.2.0.2.0 - Production on Fri Nov 21 09:16:36 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    connected to target database: WEBDEV (DBID=1965364971)
    RMAN> show all;
    using target database control file instead of recovery catalog
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 5;
    CONFIGURE BACKUP OPTIMIZATION OFF; # default
    CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
    CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/app/oracle/product/10.2/dbs/snapcf_webdev.f'; # default
    RMAN> run {
    2> allocate channel t1 type 'SBT_TAPE';
    3> restore spfile to pfile '/app/oracle/product/10.2/dbs/webdev_pfile.tst' from autobackup maxseq=300;
    4> }
    allocated channel: t1
    channel t1: sid=256 devtype=SBT_TAPE
    channel t1: Veritas NetBackup for Oracle - Release 6.5 (2007111606)
    Starting restore at 21-NOV-08
    released channel: t1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 11/21/2008 09:23:46
    RMAN-06494: MAXSEQ = 300 is out of range (0-255)
    RMAN>
    </code>

    The "sequence" here is not the Log Sequence Number that is assigned when LGWR switches from one Redo Log to another, and the previous one is archived out as an Archivelog (if running in ARCHIVELOG mode).
    The "sequence" here is the sequence of the controlfile autobackup that was created. In AUTOBACKUP mode every change to the database structure (eg adding a new datafile) causes an Autobackup. Similarly, every Database Backup causes an Autobackup. Since multiple such autobackups can occur within a single day, Oracle assigns a SEQUENCE to differentiate beteween the backups created on the same day. It is this sequence that is limited to 255 .
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • How to confiuge RMAN offline and online back-up at a pre-determined time.

    Hallo!I am an Oracle newbie currently studying the Oracle 10g Database Administration Certification.Still very new to Enterprise Manager.
    My query is that can you configure an offline database back-up such that you can set up an offline backup at a pre-determined time?
    I am assumng a real-office scenario where a DBA would like to have an offline back-up at night e.g. at 1 am when they are no users in the office.If the DBA can set the system such that everday at 1 am ,the instance shuts down,back-up is done e.g a backup set that can be stored on tape,then after backup the instance re-starts itself.All this should be automated such that by the time staff report in the morning ,the instance is up and running and users can work seamlessely
    How can I automate this entire process using RMAN and/or Enterprise Manager or a sript to achieve this?Also,I would like to know if you can automate the same for online back-up such that it can backup while instance is still running and users are accessing the DB.
    Please help me on this and I shall be infinitely grateful.Thanks in advance.

    Hi,
    On UNIX server, you can use shell script and sql scripts that can do this job for you. Once the scripts are tested succesfully, you can put them in the crontab.
    Crontab entry should reflect the time, day, week, month details as you thought to schedule it.
    This link may help you. http://www.dbasupport.com/oracle/scripts/Backup_Recovery/RMAN_Backup/
    Regards,
    vasu

  • Creating a new controlfile with datafiles in RMAN backup

    Hi,
    i am using oracle 10g (10.2.0.1) in RHEL5 server. i am trying to restore a RMAN backup from one server to another new server with new db name. i have taken out the spfile from RMAN autobackup and created pfile from it and edited the pfile with new dbname and directory structure and started the db in nomount with the new pfile. Now i have restored the controfile from the RMAN autobackup tried to put the database in mount state. But it failed due to the below error
    RMAN-03002: failure of alter db command at 11/05/2012 21:44:56
    ORA-01103: database name 'ORADB' in control file is not 'DEVDB'
    Hence i shutdown the database and started the db in nomount with new pfile and tried to create the controlfile with the new db name,but it failed as it is looking for the datafiles.
    ORA-01503: CREATE CONTROLFILE failed
    ORA-01565: error in identifying file
    '/u01/app/oracle/oradata/DEVDB/datafile/o1_mf_system_80jq0kfw_.dbf'
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
    All my datafiles reside in my RMAN backup. How to get the datafiles from RMAN backup in the above scenario??
    Regards,
    007

    Hello;
    The location and filename and DBIS will be different, but you need something like this :
    $ORACLE_HOME/bin/rman  << EOF
    CONNECT TARGET /
    STARTUP NOMOUNT;
    SET DBID 3754763357;  #DBID of PROD database
    RUN
       ALLOCATE CHANNEL c1 DEVICE TYPE disk format '/u01/oradata/backups';
       RESTORE CONTROLFILE FROM '/u01/oradata/backups/sb_t790762003_s85_p1';
       ALTER DATABASE MOUNT;
       SET NEWNAME FOR DATAFILE 1 TO '/u01/app/oracle/oradata/CLONE/system01.dbf';
        SET NEWNAME FOR TEMPFILE 1 TO '/u01/app/oracle/oradata/CLONE/temp01.dbf';
       RESTORE DATABASE;
       SWITCH DATAFILE ALL;
       RECOVER DATABASE;
       release channel c1;
    ALTER DATABASE OPEN RESETLOGS; So you need "SET NEWNAME" for all your files
    Full Example
    http://www.visi.com/~mseberg/rman/restore_database_without_catalog.html
    Best Regards
    mseberg

  • Control file and Rman

    Hello,
    I have 2 disctinct servers.
    oracle 10gr2 in each one with the same linux red hat 4 version.
    the second server is just to TEST if the backup create with the first one, works fine.
    So the install in each server is exactlly the same...
    same files, same path etc.
    Scenario:
    1 from srv one I execute a full backup with RMAN
    2 I copy the file in server 2
    3 I move a datafile in order to create an error
    4 I test : restore database in server 2...
    I get the followin error:
    RMAN-03002: failure of restore command at 02/24/2008 21:15:37
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 8 found to restore
    and this command return no result:
    RMAN> list backupset;
    RMAN>
    the file created with server 1 have been copied in the declared path into server 2...
    I have execute a crosscheck backup too
    RMAN> crosscheck backup;
    using channel ORA_DISK_1
    RMAN>
    Must I copy the controle file too? in this case will I have an inconsistent error?
    Thanks to help
    Cheers

    You must have
    controlfile autobackup on
    (If you don't change the format it will be in $ORACLE_HOME/dbs, and the format will be c-<database id>-<yyyymmdd>_<piece>.ctl).
    You must copy that file, as it has information about your most recent backup, the backup you just made.
    Hth
    Sybrand Bakker
    Senior Oracle DBA

  • Problem in recover physical standby database(Data Guard) by rman

    Hello to all
    I have created a physical standby database ,I want make backup of it by rman and when I lose it's datafile I can restore it ,making backup and restore is fine but in recovery I encounter some problem
    scenarios is follow
    1- In rman I create a backup of standby database by this command:
    backup database plus archivelog delete all input;
    2- I run this comman in rman for recover standby database
    run{
    2> set until scn 1392701;
    3> restore database;
    4> recover database;
    5> }
    (1392701 is extracted from this query "SELECT MAX(NEXT_CHANGE#)+1 UNTIL_SCN FROM V$LOG_HISTORY LH,
    V$DATABASE DB WHERE LH.RESETLOGS_CHANGE#=DB.RESETLOGS_CHANGE# AND LH.RESETLOGS_TIME =
    DB.RESETLOGS_TIME;" "http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/rman.htm")
    but RMAN result is like this:
    executing command: SET until clause
    Starting restore at 13-DEC-08
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting datafile backupset restore
    channel ORA_DISK_1: specifying datafile(s) to restore from
    backup set
    restoring datafile 00001 to /u01/app/oracle/oradata/sari/system01.dbf
    restoring datafile 00002 to /u01/app/oracle/oradata/sari/undotbs01.dbf
    restoring datafile 00003 to /u01/app/oracle/oradata/sari/sysaux01.dbf
    restoring datafile 00004 to /u01/app/oracle/oradata/sari/users01.dbf
    restoring datafile 00005 to /u01/app/oracle/oradata/sari/example01.dbf
    restoring datafile 00006 to /u01/app/oracle/oradata/sari/users02.dbf
    channel ORA_DISK_1: reading from backup piece /home/oracle/backup/0ek24dt4_1_1
    channel ORA_DISK_1: restored backup piece 1
    piece handle=/home/oracle/backup/0ek24dt4_1_1
    tag=TAG20081213T042506
    channel ORA_DISK_1: restore complete, elapsed time: 00:01:07
    Finished restore at 13-DEC-08
    Starting recover at 13-DEC-08
    using channel ORA_DISK_1
    starting media recovery
    archive log thread 1 sequence 116 is already on disk as file /u01/app/oracle/oradata/archive/1_116_666786084.arc
    archive log thread 1 sequence 117 is already on disk as file /u01/app/oracle/oradata/archive/1_117_666786084.arc
    archive log filename=/u01/app/oracle/oradata/archive/1_116_666786084.arc thread=1 sequence=116
    archive log filename=/u01/app/oracle/oradata/archive/1_117_666786084.arc thread=1 sequence=117
    unable to find archive log
    archive log thread=1 sequence=118
    RMAN-03002: failure of recover command at 12/13/2008 05:14:13
    RMAN-06054: media recovery requesting unknown log: thread 1
    seq 118 lowscn 1392700
    3- then I decline 1392701 to 1392700 and i run this command
    run{
    2> set until scn 1392700;
    3> restore database ;
    4> recover database;
    5> }
    executing command: SET until clause
    Starting restore at 13-DEC-08
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting datafile backupset restore
    channel ORA_DISK_1: specifying datafile(s) to restore from
    backup set
    restoring datafile 00001 to /u01/app/oracle/oradata/sari/system01.dbf
    restoring datafile 00002 to /u01/app/oracle/oradata/sari/undotbs01.dbf
    restoring datafile 00003 to /u01/app/oracle/oradata/sari/sysaux01.dbf
    restoring datafile 00004 to /u01/app/oracle/oradata/sari/users01.dbf
    restoring datafile 00005 to /u01/app/oracle/oradata/sari/example01.dbf
    restoring datafile 00006 to /u01/app/oracle/oradata/sari/users02.dbf
    channel ORA_DISK_1: reading from backup piece /home/oracle/backup/0ek24dt4_1_1
    channel ORA_DISK_1: restored backup piece 1
    piece handle=/home/oracle/backup/0ek24dt4_1_1 tag=TAG20081213T042506
    channel ORA_DISK_1: restore complete, elapsed time: 00:01:08
    Finished restore at 13-DEC-08
    Starting recover at 13-DEC-08
    using channel ORA_DISK_1
    starting media recovery
    archive log thread 1 sequence 116 is already on disk as
    file /u01/app/oracle/oradata/archive/1_116_666786084.arc
    archive log thread 1 sequence 117 is already on disk as
    file /u01/app/oracle/oradata/archive/1_117_666786084.arc
    archive log filename=/u01/app/oracle/oradata/archive/1_116_666786084.arc thread=1
    sequence=116archive log
    filename=/u01/app/oracle/oradata/archive/1_117_666786084.arc
    thread=1 sequence=117Oracle Error:
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS
    would get error below
    ORA-01152: file 1 was not restored from a sufficiently old backup
    ORA-01110: data file 1: '/u01/app/oracle/oradata/sari/system01.dbf'
    media recovery complete, elapsed time: 00:00:10
    Finished recover at 13-DEC-08
    4- if I run
    run{
    restore database;
    recover database;
    I will recieve that error of step 2 (RMAN-06054: media recovery requesting unknown log: thread 1
    seq 118 lowscn 1392700)
    5- if I just restore the database and I don't perform recovery by rman and I restart redo apply all thing seem fine
    but in opening database I'll recieve ORA-01152: file 1 was not restored from a sufficiently old backup
    ORA-01110: data file 1: '/u01/app/oracle/oradata/sari/system01.dbf' error)
    do you know what is problem
    thanks
    Edited by: ARKH on Dec 12, 2008 11:06 PM

    hi
    I myself have found the solution , when I recover the standby database
    it do recovery but at the end of recovery it raise the error(RMAN-06054: media recovery requesting unknown log: thread 1
    seq 118 lowscn 1392700) but if I begain redo apply before open the database
    and I wait till all redo apply process start and communication between the
    standby database and the primary database start, then I can
    open the standby database and no error will raise
    but if befor restarting redo apply I open the database I'll recieve the
    ORA-01152: file 1 was not restored from a sufficiently old backup
    ORA-01110: data file 1: '/u01/app/oracle/oradata/sari/system01.dbf' error
    thanks

  • RMAN recovery from tape and disk?

    Hey Guys,
    Here is my scenario: -
    I have Oracle 10g and I am using RMAN to backup to disk and then I use Networker to backup on tapes from disk (retention is set to 30 days on tapes). On RMAN - my retention policy is set to recovery window of 5 days after which it deletes the obsolete backup from disk and updates the control file.
    My Questions:
    1. If I have to recover any datafile or tablespace 20 days ago how can I restore it on Production. Since I am also backing up control files on tapes but my current control file will not have 20 days old information. Is there any way that I can restore my old backup?
    2.How can I test my tape backup which is older than 5 days. In other words how can I restore my database from tape on another server/
    Please suggest.

    If you need to restore the whole database to a point in time that is 20 days old, you "only" need:
    1. to identify the right control file backup
    2. restore this control file backup with Networker
    3. start the instance in mount mode
    4. list required datafiles and archived redo logs backup sets listed in this control file with LIST BACKUP
    5. restore these backup sets with Networker
    6. restore and recover database with RMAN with the right SET UNTIL clause.
    If you need to restore only 1 tablespace, that's Tablespace Point In Time Recovery (TSPITR) and is another story.
    I don't think you can only restore 1 datafile that is 20 days old and leave other datafiles up-to-date (unless there is only 1 datafile in the tablespace and in this case this is TSPITR).

  • Problem in recovery from RMAN backup in case of disk failure

    Hi
    I have Oracle 9.2.0.1.0 on Windows. Full Hot RMAN backup of database is scheduled on daily basis. I am taking backup on disks. And then i do manually copy them on tapes. If any disk failure occurs than can i recover database completely in this scenario. If tried restoing that backup on different machine as given below
    set ORACLE_SID=<name>
    rman target sys/<pwd>@ORACLE_SID nocatalog
    startup nomount
    restore spfile
    create pfile from spfile
    startup nomount pfile
    alter database mount
    restore database
    Everything worked fine till above steps. Now i will execute last step.
    recover database
    Here it gives error:-RMAN-06054: media recovery requesting unknown log: thread 1 scn 264750
    Still i typed
    alter database open resetlogs
    Now i can open my database, But is it recovered completely? Or there is loss of some data? Why it is giving this error?
    Thanks in advance. Waiting for reply.

    I can understand the confusion with this whole concept.
    What I meant by all archivelogs is all the archivelogs that were backed up with the backup itself. Again, it is essential to ensure that you archive the current redo log AFTER the backup is performed and then back those archivelogs too. Good thing is, RMAN will take care of this for you if you backup the archivelogs with the BACKUP DATABASE command and/or backup the archivelogs AFTER you run the BACKUP DATABASE command.
    Once you've mounted the controlfile and CATALOG the archivelogs, you can go into SQL*Plus and issue the following query:
    select SEQUENCE#, FIRST_CHANGE#, NEXT_CHANGE# from v$archived_log
    order by FIRST_TIME;This will tell you what archivelog is the latest. Logs generated during the backup may also provide the necessary information. Performing Disaster Recovery should help to understand the full process.
    The ONLINELOG directory in FRA is only populated if you've configured your redo logs to be stored there. However, you are on 9i...right? If so 9i doesn't utilize a FRA.
    HTH
    Edited by: ebrian on Oct 3, 2008 1:08 PM

  • RMAN Obsolete

    Hi Guys,
    I'm having 15 days of backup in RMAN Catalog and my initial RMAN config is as per below:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 10;
    Since I only want to keep the backup for latest 10 days, so I have changed the config to:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 10 DAYS;
    But after the change, when I ran report obsolete; , I'm not seeing any obsolete backups. Suppose in this case, I should be able to see the obsolete backups for first 5 days. This cause me unable to delete the obsolete backups and my server is running out of space.
    Highly appreciate your input in this matter.
    Thanks,
    Nesan

    From my observation (for RECOVERY WINDOW):
    Level 0 backup won't get obsoletes until all the level 1 backups get obsolete.
    Wrong perception
    Setting RMAN recovery window to 2 days make any backup older than 2 days become obsolete is a myth.
    See below the scenario which make you understand what need to consider when you are setting RMAN recovery window.
    For Non Incremental Level backup
    ================================
    Assume no backup exist before 13th of Oct
    Assume recovery window is 2
    POR = Point of recoverability
    date          backup type          status               POR (Current date-recovery window)
    13-OCT-2009     Full backup          No obsolete found     13-OCT-2009-2 = 11-OCT-2009
    15-OCT-2009     Full backup          No obsolete found     15-OCT-2009-2 = 13-OCT-2009
    16-OCT-2009     Full backup          No obsolete found     16-OCT-2009-2 = 14-OCT-2009See above table data on 16-OCT-2009 , POR is 14-OCT-2009 and you dont have any backup on 14th of oct within yours backup schedule, in this case 13th Oct backup will enable you POR of 14th Oct , 13th Oct backup will not be marked obsoleted
    What would be happen on 17th of october
    date          backup type          status               POR (Current date-recovery window=POR)
    13-OCT-2009     Full backup          No obsolete found     13-OCT-2009-2 = 11-OCT-2009
    15-OCT-2009     Full backup          No obsolete found     15-OCT-2009-2 = 13-OCT-2009
    16-OCT-2009     Full backup          No obsolete found     16-OCT-2009-2 = 14-OCT-2009
    17-OCT-2009     No   backup          13th Oct Full backup     17-OCT-2009-2 = 15-OCT-2009
                             will be marked
                             obsoletedSee above table data on 17-OCT-2009 , POR is 15-OCT-2009 you have backup on 15th of oct within yours backup schedule, in this case 13th Oct backup will not be needed for the point of recoverability for 15th of Oct ,15th Oct backup already exist for the POR,15th Oct backup will provide you POR and hence 13th Oct backup will be marked obsoleted.
    For Incremental Level backup
    ================================
    Assume no backup exist before 13th of Oct
    Assume recovery window is 2
    POR = Point of recoverability
    date          backup type          status               POR (Current date-recovery window)
    13-OCT-2009     L0               No obsolete found     13-OCT-2009-2 = 11-OCT-2009
    14-OCT-2009     L1               No obsolete found     14-OCT-2009-2 = 12-OCT-2009
    15-OCT-2009     L1               No obsolete found     15-OCT-2009-2 = 13-OCT-2009
    16-OCT-2009     L1               No obsolete found     16-OCT-2009-2 = 14-OCT-2009See above table data on 16-OCT-2009 , POR is 14-OCT-2009 you have backup on 14th of oct within yours backup schedule but this backup is L1 not L0 , in this case 13th Oct backup will be needed for the point of recoverability for 14th of Oct ,13th Oct backup will not be marked obsoleted.
    date          backup type          status               POR (Current date-recovery window)
    13-OCT-2009     L0               No obsolete found     13-OCT-2009-2 = 11-OCT-2009
    14-OCT-2009     L1               No obsolete found     14-OCT-2009-2 = 12-OCT-2009
    15-OCT-2009     L1               No obsolete found     15-OCT-2009-2 = 13-OCT-2009
    16-OCT-2009     L1               No obsolete found     16-OCT-2009-2 = 14-OCT-2009
    17-OCT-2009     L1               No obsolete found     17-OCT-2009-2 = 15-OCT-2009See above table data on 17-OCT-2009 , POR is 15-OCT-2009 you have backup on 15th of oct within yours backup schedule but this backup is L1 not L0 ,in this case 13th Oct backup will be needed for the point of recoverability for 15th of Oct ,13th Oct backup will not me marked obsoleted yet.
    date          backup type          status               POR (Current date-recovery window)
    13-OCT-2009     L0               No obsolete found     13-OCT-2009-2 = 11-OCT-2009
    14-OCT-2009     L1               No obsolete found     14-OCT-2009-2 = 12-OCT-2009
    15-OCT-2009     L1               No obsolete found     15-OCT-2009-2 = 13-OCT-2009
    16-OCT-2009     L1               No obsolete found     16-OCT-2009-2 = 14-OCT-2009
    17-OCT-2009     L1               No obsolete found     17-OCT-2009-2 = 15-OCT-2009
    18-OCT-2009     L1               No obsolete found     18-OCT-2009-2 = 16-OCT-2009
    19-OCT-2009     L1               No obsolete found     19-OCT-2009-2 = 17-OCT-2009
    20-OCT-2009     L0               No obsolete found     20-OCT-2009-2 = 18-OCT-2009
    21-OCT-2009     No backup          No obsolete found     21-OCT-2009-2 = 19-OCT-2009
    22-OCT-2009     No backup          obsolete found          22-OCT-2009-2 = 20-OCT-2009
                             13th L0 and its alls
                             L1 See above table data on 22-OCT-2009 , POR is 20-OCT-2009 you have L0 backup on 20th of oct within yours backup schedule and this backup is L0 not L1 ,in this case 20th Oct backup will be needed for the point of recoverability for 20th of Oct ,before 20th L0 backup 13th L0 backup will marked obsoleted and hence alls its incremental level backup will be marked as obsoleted.
    Khurram

Maybe you are looking for