6 Replies Latest reply: Jan 21, 2013 5:23 AM by JohnWatson RSS

    backup fix, need help

    864988
      Hello,
      Database 11.2.0.3 , Server: Linux Redhat 6.

      We validate backup to tape once a month using the following script:
      run
      {
      allocate channel t1_tape_backup type 'SBT_TAPE' format '%U' parms 'ENV=(NSR_SERVER=bkupstl.mmt.ppc.com,NSR_CLIENT=venus1,NSR_DATA_VOLUME_POOL=advert1)';
      allocate channel t2_tape_backup type 'SBT_TAPE' format '%U' parms 'ENV=(NSR_SERVER=bkupstl.mmt.ppc.com,NSR_CLIENT=venus1,NSR_DATA_VOLUME_POOL=advert1)';
      allocate channel t3_tape_backup type 'SBT_TAPE' format '%U' parms 'ENV=(NSR_SERVER=bkupstl.mmt.ppc.com,NSR_CLIENT=venus1,NSR_DATA_VOLUME_POOL=advert1)';
      allocate channel t4_tape_backup type 'SBT_TAPE' format '%U' parms 'ENV=(NSR_SERVER=bkupstl.mmt.ppc.com,NSR_CLIENT=venus1,NSR_DATA_VOLUME_POOL=advert1)';
      allocate channel t5_tape_backup type 'SBT_TAPE' format '%U' parms 'ENV=(NSR_SERVER=bkupstl.mmt.ppc.com,NSR_CLIENT=venus1,NSR_DATA_VOLUME_POOL=advert1)';
      allocate channel t6_tape_backup type 'SBT_TAPE' format '%U' parms 'ENV=(NSR_SERVER=bkupstl.mmt.ppc.com,NSR_CLIENT=venus1,NSR_DATA_VOLUME_POOL=advert1)';
      allocate channel t7_tape_backup type 'SBT_TAPE' format '%U' parms 'ENV=(NSR_SERVER=bkupstl.mmt.ppc.com,NSR_CLIENT=venus1,NSR_DATA_VOLUME_POOL=advert1)';
      allocate channel t8_tape_backup type 'SBT_TAPE' format '%U' parms 'ENV=(NSR_SERVER=bkupstl.mmt.ppc.com,NSR_CLIENT=venus1,NSR_DATA_VOLUME_POOL=advert1)';
      RESTORE DATABASE CHECK LOGICAL VALIDATE;
      RESTORE CONTROLFILE VALIDATE;
      restore archivelog from time 'sysdate - 7' validate;
      restore spfile validate;
      release channel t1_tape_backup;
      release channel t2_tape_backup;
      release channel t3_tape_backup;
      release channel t4_tape_backup;
      release channel t5_tape_backup;
      release channel t6_tape_backup;
      release channel t7_tape_backup;
      release channel t8_tape_backup;
      }
      This is the first time, the script run in production and I am having the following error;
      allocated channel: t1_tape_backup
      channel t1_tape_backup: SID=11308 device type=SBT_TAPE
      channel t1_tape_backup: NMDA Oracle v1.2.0
      
      allocated channel: t2_tape_backup
      channel t2_tape_backup: SID=11622 device type=SBT_TAPE
      channel t2_tape_backup: NMDA Oracle v1.2.0
      
      allocated channel: t3_tape_backup
      channel t3_tape_backup: SID=11937 device type=SBT_TAPE
      channel t3_tape_backup: NMDA Oracle v1.2.0
      
      allocated channel: t4_tape_backup
      channel t4_tape_backup: SID=12250 device type=SBT_TAPE
      channel t4_tape_backup: NMDA Oracle v1.2.0
      
      allocated channel: t5_tape_backup
      channel t5_tape_backup: SID=12564 device type=SBT_TAPE
      channel t5_tape_backup: NMDA Oracle v1.2.0
      
      allocated channel: t6_tape_backup
      channel t6_tape_backup: SID=12876 device type=SBT_TAPE
      channel t6_tape_backup: NMDA Oracle v1.2.0
      
      allocated channel: t7_tape_backup
      channel t7_tape_backup: SID=13193 device type=SBT_TAPE
      channel t7_tape_backup: NMDA Oracle v1.2.0
      
      allocated channel: t8_tape_backup
      channel t8_tape_backup: SID=13507 device type=SBT_TAPE
      channel t8_tape_backup: NMDA Oracle v1.2.0
      
      Starting restore at 20-JAN-13
      
      released channel: t1_tape_backup
      released channel: t2_tape_backup
      released channel: t3_tape_backup
      released channel: t4_tape_backup
      released channel: t5_tape_backup
      released channel: t6_tape_backup
      released channel: t7_tape_backup
      released channel: t8_tape_backup
      RMAN-00571: ===========================================================
      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
      RMAN-00571: ===========================================================
      RMAN-03015: error occurred in stored script validate_tape_backup
      RMAN-03002: failure of restore command at 01/20/2013 01:05:56
      RMAN-06026: some targets not found - aborting restore
      RMAN-06100: no channel to restore a backup or copy of datafile 441
      
      
      RMAN> 
      I verified the datafile 441 and looks its created the 18th of January 2013. We backup datafiles to tape every Sunday and once a week.
      My understandbin, RMAN didn't found on tape the new datafile created by 18th of January as the last tape backup was done the 13 of January 2013.
      SQL> SELECT NAME, creation_time, STATUS  FROM V$DATAFILE V WHERE FILE# = 441;
       
      NAME                                                                                                  CREATION_TIME                STATUS
      -------------------------------------------------------------------------------- -                         ------------                            -------
      +DATA_DG/livedb1/datafile/sysaux.1735.805037295                                 18-ene-13 3:2                      ONLINE
       
      SQL> 
      Any suggestion to fix to fix the script or to do it differently?

      Thank you,
        • 1. Re: backup fix, need help
          Osama_Mustafa
          Refer to
          https://blogs.oracle.com/gverma/entry/puzzling_rman_no_channel_to_re
          • 2. Re: backup fix, need help
            newbieDBA
            Hey Osama Mustufa!! , its an off topic question ,
            May i know your age ? u just register in 2011 and now you are GURU
            i m wondering what could be your age so i can compare myself to you on knowledge

            Edited by: newbieDBA on Jan 21, 2013 12:23 AM
            • 3. Re: backup fix, need help
              Osama_Mustafa
              newbieDBA wrote:
              Hey Osama Mustufa!! , its an off topic question ,
              May i know your age ? u just register in 2011 and now you are GURU
              i m wondering what could be your age so i can compare myself to you on knowledge

              Edited by: newbieDBA on Jan 21, 2013 12:23 AM
              is it matter :) ?
              • 4. Re: backup fix, need help
                newbieDBA
                Yea!!
                For me :)
                I wanna know how fast you learnt , and where am i in this Great World (huge)

                Bcos overall , generally ppl stop working @ 60 :)
                so ask about age

                Edited by: newbieDBA on Jan 21, 2013 1:13 AM
                • 5. Re: backup fix, need help
                  moreajays
                  Hi DBA,

                  You have run RESTORE ... VALIDATE to test whether RMAN can restore a specific file or set of files from a backup.
                  RMAN chooses which backups to use.The database must be mounted or open for this command.
                  When validating files on disk or tape, RMAN reads all blocks in the backup piece or image copy.

                  If you do not see an RMAN error stack, then skip the subsequent steps. The lack of error messages means that RMAN had confirmed that it can use these backups successfully during a real restore and recovery.

                  The following error means that RMAN cannot restore one or more of the specified files from your available backups:

                  RMAN-06026: some targets not found - aborting restore

                  Just to re-confirm , do below ..

                  1. Allocate only one channel
                  2. use any of the below at one time
                  RESTORE DATABASE CHECK LOGICAL VALIDATE;
                  RESTORE CONTROLFILE VALIDATE;
                  restore archivelog from time 'sysdate - 7' validate;
                  restore spfile validate;
                  RMAN> RESTORE CONTROLFILE VALIDATE;
                  
                  Starting restore at 21-JAN-13
                  using channel ORA_DISK_1
                  
                  channel ORA_DISK_1: starting validation of datafile backup set
                  channel ORA_DISK_1: reading from backup piece /u01/app/ora11g/product/11.2.0/dbhome_1/dbs/cntrl_38_1_802553578
                  channel ORA_DISK_1: piece handle=/u01/app/ora11g/product/11.2.0/dbhome_1/dbs/cntrl_38_1_802553578 tag=TAG20121220T193258
                  channel ORA_DISK_1: restored backup piece 1
                  channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
                  Finished restore at 21-JAN-13
                  Thanks,
                  Ajay More
                  http://www.moreajays.com
                  • 6. Re: backup fix, need help
                    JohnWatson
                    The "fix" is to back up the new file. Do it now! Do it before you reply to this! Yes, we all know that you can recover a file that has never been backed up, but it takes time. Right now, you are vulnerable to down time in the event of failure. (Therefore, you are also vulnerable to losing yor job).