1 2 3 Previous Next 68 Replies Latest reply: Apr 16, 2012 5:37 AM by __OUTSIDER___ RSS

    RMAN duplicate database

    __OUTSIDER___
      Hi experts,

      I searched in NET for this problem and found many things but unfortunately no one can help me.
      I hope someone can help me to understand RMAN behavior.

      So problem is in RMAN duplicate database command.
      I don't realize why RMAN needs some old version of my system01.dbf file...

      Environment: Linux_Red_Hat/Oracle DB 10.2.0.5

      Here my history.

      I have 2 HP Blade server for Oracle DB. One of them production and second for backup.
      My target is duplicate database from 1 Server to 2 server without downtime.

      1. Backup database


      RMAN> backup database

      Status OK

      2. I share backup DB files via NFS for second server and archive logs also.
      I create pfile from working DB spfile and transfer it to second DB.

      3. I start second (aux) DB.

      startup force nomount pfile='/tmp/aux.ora'

      4. Connecting to target and auxiliary DB with RMAN from second DB server.

      rman target sys/passwd@SID_OF_FIRST_SERVER auxiliary /

      5 and finally start duplication.
      run
       {
      duplicate target database to RBS
      nofilenamecheck
      pfile=/tmp/aux.ora;
       }
      All was well until RMAN did not want to open the database.
      *******
      datafile 31 switched to datafile copy
      input datafile copy recid=29 stamp=778586070 filename=/u01/app/oracle/RBS/undutbs0001.dbf
      datafile 32 switched to datafile copy
      input datafile copy recid=30 stamp=778586070 filename=/storage/oraData/RBS/ts_log_data002
      
      contents of Memory Script:
      {
         set until scn  927620127;
         recover
         clone database
          delete archivelog
         ;
      }
      executing Memory Script
      executing command: SET until clause
      Starting recover at 22-MAR-12
      using channel ORA_AUX_DISK_1
      starting media recovery
      
      Oracle 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/RBS/system01.dbf'
      RMAN-00571: ===========================================================
      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
      RMAN-00571: ===========================================================
      RMAN-03002: failure of Duplicate Db command at 03/22/2012 09:54:53
      RMAN-03015: error occurred in stored script Memory Script
      RMAN-06053: unable to perform media recovery because of missing log
      RMAN-06025: no backup of log thread 1 seq 28077 lowscn 927585117 found to restore
      RMAN-06025: no backup of log thread 1 seq 28076 lowscn 927557148 found to restore
      **********
      RMAN-06025: no backup of log thread 1 seq *28022* lowscn 927557148 found to restore 
      I also tried to duplicate database until last available sequence but also fail :(

      run
       {
      set until sequence 28022 thread 1;
      duplicate target database to RBS
      nofilenamecheck
      pfile=/tmp/aux.ora;
       }
      Starting restore at 22-MAR-12
      using channel ORA_AUX_DISK_1
      
      RMAN-00571: ===========================================================
      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
      RMAN-00571: ===========================================================
      RMAN-03002: failure of Duplicate Db command at 03/22/2012 10:32:17
      RMAN-03015: error occurred in stored script Memory Script
      RMAN-06026: some targets not found - aborting restore
      RMAN-06023: no backup or copy of datafile 31 found to restore
      RMAN-06023: no backup or copy of datafile 30 found to restore
      RMAN-06023: no backup or copy of datafile 29 found to restore
      RMAN-06023: no backup or copy of datafile 28 found to restore
      RMAN-06023: no backup or copy of datafile 27 found to restore
      RMAN-06023: no backup or copy of datafile 26 found to restore
      RMAN-06023: no backup or copy of datafile 25 found to restore
      RMAN-06023: no backup or copy of datafile 24 found to restore
      RMAN-06023: no backup or copy of datafile 23 found to restore
      RMAN-06023: no backup or copy of datafile 22 found to restore
      RMAN-06023: no backup or copy of datafile 21 found to restore
      RMAN-06023: no backup or copy of datafile 20 found to restore
      RMAN-06023: no backup or copy of datafile 19 found to restore
      RMAN-06023: no backup or copy of datafile 18 found to restore
      RMAN-06023: no backup or copy of datafile 17 found to restore
      RMAN-06023: no backup or copy of datafile 16 found to restore
      RMAN-06023: no backup or copy of datafile 15 found to restore
      RMAN-06023: no backup or copy of datafile 14 found to restore
      RMAN-06023: no backup or copy of datafile 13 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 9 found to restore
      RMAN-06023: no backup or copy of datafile 8 found to restore
      RMAN-06023: no backup or copy of datafile 7 found to restore
      RMAN-06023: no backup or copy of datafile 6 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 3 found to restore
      RMAN-06023: no backup or copy of datafile 2 found to restore
      RMAN-06023: no backup or copy of datafile 1 found to restore
      I understand that RMAN need some more logs and backups but I can't understand why.
      For example if some one wants duplicate DB and there are
      no archivelogs because you cant keep all logs forever what then.
      Also I understand that I don't understand this all very well so please help :)

      ./thanks
        • 1. Re: RMAN duplicate database
          NikolayIvankin
          __OUTSIDER___ wrote:
          1. Backup database


          RMAN> backup database

          Status OK
          Here backup database with archivelogs;
          • 2. Re: RMAN duplicate database
            CKPT
            >
            RMAN-06053: unable to perform media recovery because of missing log
            RMAN-06025: no backup of log thread 1 seq 28077 lowscn 927585117 found to restore
            RMAN-06025: no backup of log thread 1 seq 28076 lowscn 927557148 found to restore
            >

            Looks your database restore successfully, Now either restore archives from backups or copy archives from Source database and perform recovery manually.
            Or take backup database with archivelogs and retry
            • 3. Re: RMAN duplicate database
              __OUTSIDER___
              Hi guys , thanks for reactive reply :)

              I understand but I have archivelog only for 2 days, others deleted.
              • 4. Re: RMAN duplicate database
                NikolayIvankin
                Then make new backup with archivelogs
                • 5. Re: RMAN duplicate database
                  __OUTSIDER___
                  Hi guys,

                  I followed your suggestion but unfortunately RMAN duplicate database failed again.

                  I did the following
                  RMAN > backup database plus archivelog
                  its OK

                  and after I did
                  RMAN > 
                  run
                   {
                  duplicate target database to RBS
                  nofilenamecheck
                  pfile=/tmp/aux.ora;
                   }
                  and ........
                  Starting recover at 22-MAR-12
                  using channel ORA_AUX_DISK_1
                  
                  starting media recovery
                  
                  archive log thread 1 sequence 28072 is already on disk as file /storage/oracle_RBS_backup/RBS/archivelog/2012_03_22/o1_mf_1_28072_7poskdf3_.arc
                  archive log thread 1 sequence 28073 is already on disk as file /storage/oracle_RBS_backup/RBS/archivelog/2012_03_22/o1_mf_1_28073_7poskjmt_.arc
                  archive log thread 1 sequence 28074 is already on disk as file /storage/oracle_RBS_backup/RBS/archivelog/2012_03_22/o1_mf_1_28074_7posk88f_.arc
                  archive log thread 1 sequence 28075 is already on disk as file /storage/oracle_RBS_backup/RBS/archivelog/2012_03_22/o1_mf_1_28075_7posknrr_.arc
                  archive log thread 1 sequence 28076 is already on disk as file /storage/oracle_RBS_backup/RBS/archivelog/2012_03_22/o1_mf_1_28076_7posks16_.arc
                  archive log thread 1 sequence 28077 is already on disk as file /storage/oracle_RBS_backup/RBS/archivelog/2012_03_22/o1_mf_1_28077_7poskxd6_.arc
                  archive log thread 1 sequence 28078 is already on disk as file /storage/oracle_RBS_backup/RBS/archivelog/2012_03_22/o1_mf_1_28078_7posl1n5_.arc
                  archive log thread 1 sequence 28079 is already on disk as file /storage/oracle_RBS_backup/RBS/archivelog/2012_03_22/o1_mf_1_28079_7posl5tt_.arc
                  archive log thread 1 sequence 28080 is already on disk as file /storage/oracle_RBS_backup/RBS/archivelog/2012_03_22/o1_mf_1_28080_7posld6n_.arc
                  archive log thread 1 sequence 28081 is already on disk as file /storage/oracle_RBS_backup/RBS/archivelog/2012_03_22/o1_mf_1_28081_7poslb0t_.arc
                  archive log thread 1 sequence 28082 is already on disk as file /storage/oracle_RBS_backup/RBS/archivelog/2012_03_22/o1_mf_1_28082_7posljcs_.arc
                  archive log thread 1 sequence 28083 is already on disk as file /storage/oracle_RBS_backup/RBS/archivelog/2012_03_22/o1_mf_1_28083_7povqjn8_.arc
                  archive log thread 1 sequence 28084 is already on disk as file /storage/oracle_RBS_backup/RBS/archivelog/2012_03_22/o1_mf_1_28084_7povqnvj_.arc
                  archive log thread 1 sequence 28085 is already on disk as file /storage/oracle_RBS_backup/RBS/archivelog/2012_03_22/o1_mf_1_28085_7poxz312_.arc
                  archive log thread 1 sequence 28086 is already on disk as file /storage/oracle_RBS_backup/RBS/archivelog/2012_03_22/o1_mf_1_28086_7pp01bd7_.arc
                  Oracle 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/RBS/system01.dbf'
                  
                  RMAN-00571: ===========================================================
                  RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                  RMAN-00571: ===========================================================
                  RMAN-03002: failure of Duplicate Db command at 03/22/2012 15:04:14
                  RMAN-03015: error occurred in stored script Memory Script
                  RMAN-06053: unable to perform media recovery because of missing log
                  RMAN-06025: no backup of log thread 1 seq 28071 lowscn 927312365 found to restore
                  RMAN-06025: no backup of log thread 1 seq 28070 lowscn 927280119 found to restore
                  *******
                  RMAN-06025: no backup of log thread 1 seq 28018 lowscn 926016939 found to restore
                  RMAN-06025: no backup of log thread 1 seq 28017 lowscn 926011543 found to restore
                  MAN-06025: no backup of log thread 1 seq 28016 lowscn 926006228 found to restor
                  One more question: if I did backup database plus archivelog+ should I share archivelog
                  folder for second server ? or archivelogs already exists in my datafilecopy which also I share for second server.
                  (my DB backup consist about 31 datafilecopy.... )

                  thanks for your help
                  • 6. Re: RMAN duplicate database
                    CKPT
                    >
                    RMAN-06053: unable to perform media recovery because of missing log
                    RMAN-06025: no backup of log thread 1 seq 28071 lowscn 927312365 found to restore
                    RMAN-06025: no backup of log thread 1 seq 28070 lowscn 927280119 found to restore
                    *******
                    RMAN-06025: no backup of log thread 1 seq 28018 lowscn 926016939 found to restore
                    RMAN-06025: no backup of log thread 1 seq 28017 lowscn 926011543 found to restore
                    MAN-06025: no backup of log thread 1 seq 28016 lowscn 926006228 found to restor
                    >

                    You have archive files from 28072 to 28086 already.
                    But the archives from 28071 up to 28016 are missing, Which needs to perform recovery.
                    After you taken backup, Have you moved even those backup pieces to same location or not?

                    if not simply put all the archive files in one location. lets suppose /u01/arch

                    run
                    {
                    catalog start wtih '/u01/arch';
                    set until sequence <sequence> --> you can skip this statement if you want to perform recovery for all the available archives.
                    recover database;
                    }


                    SQL> alter database open resetlogs';
                    • 7. Re: RMAN duplicate database
                      __OUTSIDER___
                      Thanks for reply.
                      CKPT wrote:
                      After you taken backup, Have you moved even those backup pieces to same location or not?
                      I share backup directory with NFS. (archivelog and datafile folders)

                      >
                      if not simply put all the archive files in one location. lets suppose /u01/arch
                      Both datafilescpoy and archivelog in same directory ? because I have folders archivelog and datafiles
                      and Oracle recognized both these dirs.... at least I think so...

                      >
                      run
                      {
                      catalog start wtih '/u01/arch';
                      set until sequence <sequence> --> you can skip this statement if you want to perform recovery for all the available archives.
                      recover database;
                      }
                      run
                       {
                      catalog start with '/storage/oracle_RBS_backup/RBS/datafile';
                      recover database;
                       }
                      
                      Starting recover at 22-MAR-12
                      allocated channel: ORA_DISK_1
                      channel ORA_DISK_1: sid=156 devtype=DISK
                      ORA-00604: error occurred at recursive SQL level 1
                      ORA-06552: PL/SQL: Compilation unit analysis terminated
                      ORA-06553: PLS-553: character set name is not recognized
                      
                      RMAN-08132: WARNING: cannot update recovery area reclaimable file list
                      RMAN-00571: ===========================================================
                      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                      RMAN-00571: ===========================================================
                      RMAN-03002: failure of recover command at 03/22/2012 15:46:12
                      ORA-06552: PL/SQL: Compilation unit analysis terminated
                      ORA-06553: PLS-553: character set name is not recognized
                      Please help me.
                      • 8. Re: RMAN duplicate database
                        CKPT
                        Here is example
                        RMAN> catalog start with 'c:\oracle\flash_recovery_area';
                        
                        using target database control file instead of recovery catalog
                        searching for all files that match the pattern c:\oracle\flash_recovery_area
                        
                        List of Files Unknown to the Database
                        =====================================
                        And then perform recover manually

                        RMAN> recover database;

                        If above command didn't run, then perform recovery manually.
                        • 9. Re: RMAN duplicate database
                          __OUTSIDER___
                          CKPT wrote:
                          Here is example
                          RMAN> catalog start with 'c:\oracle\flash_recovery_area';

                          using target database control file instead of recovery catalog
                          searching for all files that match the pattern c:\oracle\flash_recovery_area

                          List of Files Unknown to the Database
                          =====================================
                          I already tried this.

                          run
                           {
                          catalog start with '/storage/oracle_RBS_backup/RBS/datafile';
                          recover database;
                           }
                          
                          Starting recover at 22-MAR-12
                          allocated channel: ORA_DISK_1
                          channel ORA_DISK_1: sid=156 devtype=DISK
                          ORA-00604: error occurred at recursive SQL level 1
                          ORA-06552: PL/SQL: Compilation unit analysis terminated
                          ORA-06553: PLS-553: character set name is not recognized
                          
                          RMAN-08132: WARNING: cannot update recovery area reclaimable file list
                          RMAN-00571: ===========================================================
                          RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                          RMAN-00571: ===========================================================
                          RMAN-03002: failure of recover command at 03/22/2012 15:46:12
                          ORA-06552: PL/SQL: Compilation unit analysis terminated
                          ORA-06553: PLS-553: character set name is not recognized
                          >
                          
                          And then perform recover manually

                          RMAN> recover database;

                          If above command didn't run, then perform recovery manually.
                          What did you mean when said perform recovery manually?
                          • 10. Re: RMAN duplicate database
                            CKPT
                            RMAN-03002: failure of recover command at 03/22/2012 15:46:12
                            ORA-06552: PL/SQL: Compilation unit analysis terminated
                            ORA-06553: PLS-553: character set name is not recognized
                            Do as below or according to character set & retry.
                            $ export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

                            or perform recover manually

                            SQL> recover database using backup controlfile until cancel;

                            give each archives one by one as requested.
                            • 11. Re: RMAN duplicate database
                              __OUTSIDER___
                              CKPT wrote:
                              SQL> recover database using backup controlfile until cancel;
                              Hi, thanks for help.
                              Can you please advise me how can I solve this problem because this is very old and
                              I don't have this archivelog file which request Oracle.
                              SQL> recover database using backup controlfile until cancel
                              ORA-00279: change 727227244 generated at 10/11/2011 17:57:36 needed for thread
                              1
                              ORA-00289: suggestion :
                              */storage/oracle_RBS_backup/RBS/archivelog/2012_03_23/o1_mf_1_22139_%u_.arc*
                              ORA-27091: unable to queue I/O
                              ORA-27072: File I/O error
                              Linux Error: 13: Permission denied
                              Additional information: 4
                              Additional information: 1
                              Additional information: 441
                              ORA-27047: unable to read the header block of file
                              Linux Error: 22: Invalid argument
                              Additional information: 1
                              ORA-27047: unable to read the header block of file
                              Linux Error: 22: Invalid argument
                              Additional information: 1
                              ORA-00280: change 727227244 for thread 1 is in sequence #22139
                              Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
                              ./thanks
                              • 12. Re: RMAN duplicate database
                                NikolayIvankin
                                __OUTSIDER___ wrote:
                                SQL> recover database using backup controlfile until cancel
                                ORA-00279: change 727227244 generated at 10/11/2011 17:57:36 needed for thread
                                1
                                ORA-00289: suggestion :
                                */storage/oracle_RBS_backup/RBS/archivelog/2012_03_23/o1_mf_1_22139_%u_.arc*
                                ORA-27091: unable to queue I/O
                                ORA-27072: File I/O error
                                Linux Error: 13: Permission denied
                                Check OS permissions for /storage/oracle_RBS_backup/RBS/archivelog/2012_03_23/
                                Oracle owner just can't read from this directory
                                • 13. Re: RMAN duplicate database
                                  __OUTSIDER___
                                  Nikolay Ivankin  wrote:
                                  Check OS permissions for /storage/oracle_RBS_backup/RBS/archivelog/2012_03_23/
                                  Oracle owner just can't read from this directory
                                  Hi Nikolay thanks for reply.

                                  If it were that simple... Linux Error: 13: Permission denied....

                                  This file */storage/oracle_RBS_backup/RBS/archivelog/2012_03_23/o1_mf_1_22139_%u_.arc*
                                  doesn't exist. It is very old and I don't realize how and whence can I restore it.
                                  • 14. Re: RMAN duplicate database
                                    NikolayIvankin
                                    __OUTSIDER___ wrote:
                                    This file */storage/oracle_RBS_backup/RBS/archivelog/2012_03_23/o1_mf_1_22139_%u_.arc*
                                    doesn't exist. It is very old and I don't realize how and whence can I restore it.
                                    If you have backed up archivelog, then you can restore it.
                                    1 2 3 Previous Next