1 2 3 4 Previous Next 59 Replies Latest reply: Apr 19, 2013 1:36 AM by Hemant K Chitale RSS

    Restoration of full DB backup to Test server by using RMAN

    PrasanthkumarReddy.M
      Hi All,

      My Oracle database is 11G R2 and version is 11.2.0.2.0..!and OS is RHEL 5.

      My Database Size is 13TB.

      We are trying to restore full DB backup to test server from via Tape by using RMAN for testing purpose whether backup team is taking perfectly or not .but Getting below error while restoring the SPFILE and CONTROLFILE..Please tell that whether problem is from Oracle server side or backup server side.and please tell me the solution for the issue.

      ******************************Error Start*****************************************

      channel c1: no AUTOBACKUP in 7 days found
      channel c2: no AUTOBACKUP in 7 days found
      released channel: c1
      released channel: c2
      RMAN-00571: ===========================================================
      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
      RMAN-00571: ===========================================================
      RMAN-03002: failure of restore command at 03/06/2013 10:57:24
      RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece

      *****************************Error end********************************************

      Followed the below scripts to restore controlfile and spfile..


      Script for Spfile restoration:-
      **********************
      run
      {
      allocate channel c1 type SBT_TAPE;
      allocate channel c2 type SBT_TAPE;
      SEND 'NSR_ENV=(NSR_SERVER=dc1bkpsrvr02.cidr.gov.in,NSR_CLIENT=uidl1-rac-a16-001-vip.uidl1.dom)';
      restore spfile to '/tmp/spfile_restored.ora' from '/NM0_MDA_c-1022799756-20130303-00/';
      release channel c1;
      release channel c2;
      }



      Script for Controlfile Restoration:-
      **************************
      run
      {
      allocate channel c1 type SBT_TAPE;
      allocate channel c2 type SBT_TAPE;
      SEND 'NSR_ENV=(NSR_SERVER=dc1bkpsrvr02.cidr.gov.in,NSR_CLIENT=uidl1-rac-a16-001-vip.uidl1.dom)';
      restore controlfile to '/tmp/controlfile.ora' from '/NM0_MDA_c-1022799756-20130303-00/';
      release channel c1;
      release channel c2;
      }


      Thanks in Advance :-)


      Thanks & Regards
      Prasanth
        • 1. Re: Restoration of full DB backup to Test server by using RMAN
          vlethakula
          I suspect the problem is with
          from '/NM0_MDA_c-1022799756-20130303-00/'

          You need not mention any backup piece name. It should automatically pickup based on set until time
          • 2. Re: Restoration of full DB backup to Test server by using RMAN
            Stefan Abraham
            Hi,

            Check the log file for the backup. backup pieces including the control file and spfile should be used for restoration

            Thanks
            • 3. Re: Restoration of full DB backup to Test server by using RMAN
              Eddie Essex
              Connect to your target database and run the following:

              show all;
              list backup of spfile;
              list backup of controlfile;
              • 4. Re: Restoration of full DB backup to Test server by using RMAN
                PrasanthkumarReddy.M
                Hi eddie Essex ,

                I given below command target database(Production) and taken the latest one of Handle: /NMO_MDA_c-1022799756-20130307-02/ and tried to restore but also getting the same error.

                run
                2> {
                3> allocate channel c1 type SBT_TAPE;
                4> allocate channel c2 type SBT_TAPE;
                5> SEND 'NSR_ENV=(NSR_SERVER=dc1bkpsrvr02.cidr.gov.in,NSR_CLIENT=uidl1-rac-a16-001-vip.uidl1.dom)';
                6> restore spfile to '/tmp/spfile_restored.ora' from '/NMO_MDA_c-1022799756-20130307-02/';
                7> release channel c1;
                8> release channel c2;
                9> }

                allocated channel: c1
                channel c1: SID=90 instance=mda1 device type=SBT_TAPE
                channel c1: NMO v5.0.0.0

                allocated channel: c2
                channel c2: SID=146 instance=mda1 device type=SBT_TAPE
                channel c2: NMO v5.0.0.0

                sent command to channel: c1
                sent command to channel: c2

                Starting restore at 07-MAR-13

                channel c1: no AUTOBACKUP in 7 days found
                channel c2: no AUTOBACKUP in 7 days found
                released channel: c1
                released channel: c2
                RMAN-00571: ===========================================================
                RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                RMAN-00571: ===========================================================
                RMAN-03002: failure of restore command at 03/07/2013 08:42:26
                RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece


                Please let us know the problem of the issue..and solution for the issue..!

                Thanks & Regards
                Prasanth

                Thanks & Regards
                Prasanth
                • 5. Re: Restoration of full DB backup to Test server by using RMAN
                  Shivananda Rao
                  Hello,

                  Hope this https://shivanandarao.wordpress.com/2013/01/14/rman-06172-no-autobackup-found-or-specified-handle-is-not-a-valid-copy-or-piece/ helps you


                  Regards,
                  Shivananda
                  • 6. Re: Restoration of full DB backup to Test server by using RMAN
                    PrasanthkumarReddy.M
                    Hi Shivananda,

                    I checked the document which you shared me..it was very nice..but not able to autobackup location which kept in my production please tell me how to find the autibackup location..so that i can set the autobackup location while doing restoration of controlfile on test server.

                    Thanks & Regards
                    Prasanth
                    • 7. Re: Restoration of full DB backup to Test server by using RMAN
                      Hemant K Chitale
                      Use a SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO 'location'
                      in the Run block.


                      Hemant K Chitale
                      • 8. Re: Restoration of full DB backup to Test server by using RMAN
                        saratpvv
                        look at the below thread

                        cannot find autobackup controlfiles even though we had sunday full backup

                        you can find the location of autoback

                        RMAN> list backup of controlfile;
                        • 9. Re: Restoration of full DB backup to Test server by using RMAN
                          PrasanthkumarReddy.M
                          Hi Sarat,

                          Please find the output from the command RMAN> List backup of controlfile.( I posted for for today's output only for the command)

                          BS Key Type LV Size Device Type Elapsed Time Completion Time
                          ------- ---- -- ---------- ----------- ------------ ---------------
                          53387 Full 58.75M SBT_TAPE 00:00:03 07-MAR-13
                          BP Key: 53387 Status: AVAILABLE Compressed: NO Tag: TAG20130307T013445
                          Handle: /NMO_MDA_c-1022799756-20130307-00/ Media: UI1419L5
                          Control File Included: Ckp SCN: 35188857442 Ckp time: 07-MAR-13

                          BS Key Type LV Size Device Type Elapsed Time Completion Time
                          ------- ---- -- ---------- ----------- ------------ ---------------
                          53423 Incr 1 58.75M SBT_TAPE 00:00:13 07-MAR-13
                          BP Key: 53423 Status: AVAILABLE Compressed: NO Tag: TAG20130307T032335
                          Handle: MDA_tno3t611_1_1 Media: UI1064L5
                          Control File Included: Ckp SCN: 35198869923 Ckp time: 07-MAR-13

                          BS Key Type LV Size Device Type Elapsed Time Completion Time
                          ------- ---- -- ---------- ----------- ------------ ---------------
                          53434 Full 58.75M SBT_TAPE 00:00:03 07-MAR-13
                          BP Key: 53434 Status: AVAILABLE Compressed: NO Tag: TAG20130307T034034
                          Handle: /NMO_MDA_c-1022799756-20130307-01/ Media: UI1084L5
                          Control File Included: Ckp SCN: 35199223228 Ckp time: 07-MAR-13

                          BS Key Type LV Size Device Type Elapsed Time Completion Time
                          ------- ---- -- ---------- ----------- ------------ ---------------
                          53463 Full 58.75M SBT_TAPE 00:00:03 07-MAR-13
                          BP Key: 53463 Status: AVAILABLE Compressed: NO Tag: TAG20130307T073132
                          Handle: /NMO_MDA_c-1022799756-20130307-02/ Media: UI1084L5
                          Control File Included: Ckp SCN: 35212778364 Ckp time: 07-MAR-13

                          BS Key Type LV Size Device Type Elapsed Time Completion Time
                          ------- ---- -- ---------- ----------- ------------ ---------------
                          53492 Full 58.75M SBT_TAPE 00:00:02 07-MAR-13
                          BP Key: 53492 Status: AVAILABLE Compressed: NO Tag: TAG20130307T101656
                          Handle: /NMO_MDA_c-1022799756-20130307-03/ Media: UI1753L5
                          Control File Included: Ckp SCN: 35221800945 Ckp time: 07-MAR-13

                          BS Key Type LV Size Device Type Elapsed Time Completion Time
                          ------- ---- -- ---------- ----------- ------------ ---------------
                          53521 Full 58.75M SBT_TAPE 00:00:02 07-MAR-13
                          BP Key: 53521 Status: AVAILABLE Compressed: NO Tag: TAG20130307T131429
                          Handle: /NMO_MDA_c-1022799756-20130307-04/ Media: UI1756L5
                          Control File Included: Ckp SCN: 35233173988 Ckp time: 07-MAR-13



                          Please find the show all command from RMAN in my Production..

                          RMAN> show all;

                          RMAN configuration parameters for database with db_unique_name MDA are:
                          CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
                          CONFIGURE BACKUP OPTIMIZATION OFF; # default
                          CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
                          CONFIGURE CONTROLFILE AUTOBACKUP ON;
                          CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '/NMO_%F/';
                          CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE '???SBT_TAPE???' TO '/NMO_%F/';
                          CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
                          CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
                          CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK 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 'AES256';
                          CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
                          CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
                          CONFIGURE SNAPSHOT CONTROLFILE NAME TO '+FRA/configdb/snapc_mda1.f';


                          Recently only i added to the below two parameter in the RMAN Show all:--
                          ***********************************************************

                          CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '/NMO_%F/';
                          CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE '???SBT_TAPE???' TO '/NMO_%F/';

                          I followed the below steps while doing restoration:

                          -->export ORACLE_SID=mda1
                          -->rman target /
                          -->shutdown immediate;

                          using target database control file instead of recovery catalog
                          Oracle instance shut down

                          -->RMAN> startup nomount;

                          connected to target database (not started)
                          Oracle instance started

                          Total System Global Area 1603411968 bytes

                          Fixed Size 2226912 bytes
                          Variable Size 469763360 bytes
                          Database Buffers 1124073472 bytes
                          Redo Buffers 7348224 bytes

                          --> RMAN> SET DBID=1022799756

                          executing command: SET DBID

                          --> RMAN> SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '/NMO_%F/';

                          executing command: SET CONTROLFILE AUTOBACKUP FORMAT

                          --> RMAN> @restore_spfile.sh

                          RMAN> RUN
                          2> {
                          3> SET DBID 1022799756;
                          4> ALLOCATE CHANNEL CH1 DEVICE TYPE 'sbt_tape';
                          5> ALLOCATE CHANNEL CH2 DEVICE TYPE 'sbt_tape';
                          6> SEND 'NSR_ENV=(NSR_SERVER=dc1bkpsrvr02.cidr.gov.in,NSR_CLIENT=uidl1-rac-a16-001-vip.uidl1.dom)';
                          7> restore spfile to '/tmp/spfile_restored.ora' from '/NMO_%F/';
                          8> RELEASE CHANNEL CH1;
                          9> RELEASE CHANNEL CH2;
                          10> }
                          executing command: SET DBID

                          using target database control file instead of recovery catalog
                          allocated channel: CH1
                          channel CH1: SID=134 instance=mda1 device type=SBT_TAPE
                          channel CH1: NMO v5.0.0.0

                          allocated channel: CH2
                          channel CH2: SID=146 instance=mda1 device type=SBT_TAPE
                          channel CH2: NMO v5.0.0.0

                          sent command to channel: CH1
                          sent command to channel: CH2

                          Starting restore at 07-MAR-13

                          channel CH1: no AUTOBACKUP in 7 days found
                          channel CH2: no AUTOBACKUP in 7 days found
                          released channel: CH1
                          released channel: CH2
                          RMAN-00571: ===========================================================
                          RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                          RMAN-00571: ===========================================================
                          RMAN-03002: failure of restore command at 03/07/2013 13:57:01
                          RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece

                          RMAN> **end-of-file**


                          Finally getting up with the above error..so please let me know is i required to change any parameters in RMAN Show all or it's problem with backup taking by backup team?



                          *@Hemant K Chitale*

                          Hi Hemant i settted the controlfile autobackup like below::-->

                          RMAN> SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '/NMO_%F/';

                          Please let me know whether i going in correct manner or not..

                          Thanks for you help in advance..!


                          Thanks & Regards
                          Prasanth
                          • 10. Re: Restoration of full DB backup to Test server by using RMAN
                            Hemant K Chitale
                            NMO_MDA_c-1022799756-20130307-*
                            becomes
                            FORMAT NMO_MDA_%F


                            Hemant K Chitale
                            • 11. Re: Restoration of full DB backup to Test server by using RMAN
                              PrasanthkumarReddy.M
                              So Hemant, i need to set NMO_MDA_%F in place of '/NMO_%F/'; while setting the autobackup format in test server?

                              is i need to do in Production database RMAN Show all also? if yes means is any problem for Production?

                              Thanks & Regards
                              Prasanth
                              • 12. Re: Restoration of full DB backup to Test server by using RMAN
                                Hemant K Chitale
                                Is i need to do in Production database
                                No, not in the Production environment. Don't change anything in the Production environment.


                                Hemant K Chitale
                                • 13. Re: Restoration of full DB backup to Test server by using RMAN
                                  PrasanthkumarReddy.M
                                  Hi All,

                                  Please tell me how to take action to avoid the Error?

                                  Thanks & Regards
                                  Prasanth
                                  • 14. Re: Restoration of full DB backup to Test server by using RMAN
                                    Hemant K Chitale
                                    So, I presume that even trying to set the autobackup format in the test server didn't help the restore.

                                    Oracle isn't able to find the autobackup on tape -- most likely because the tape catalog file names don't match the expected file names.
                                    You need to look at the backup logs and the netbackup mml library to get the file name.



                                    Hemant K Chitale
                                    1 2 3 4 Previous Next