1 2 3 4 5 Previous Next 68 Replies Latest reply: Apr 16, 2012 5:37 AM by __OUTSIDER___ Go to original post RSS
      • 30. Re: RMAN duplicate database
        CKPT
        __OUTSIDER___ wrote:
        CKPT wrote:
        Sorry where can I find RMAN log ?
        Have you run RMAN in background? If so where you scheduled?

        If you run on console, if history exist then scrolldown. if doesnt exist really i cant help.
        Start for Backup + RMAN duplicate from scratch
        OK thanks , I will backup and duplicate again and post all steps but I thing something wrong with this DB because
        during DB backup nothing is wrong, everything is fine. Do you know some command that can clean this old
        information from controlfile ?
        If already restored in Auxiliary server, Take backup of PFILE & drop the database(auxiliary)
        • 31. Re: RMAN duplicate database
          __OUTSIDER___
          CKPT wrote:
          If already restored in Auxiliary server, Take backup of PFILE & drop the database(auxiliary)
          Old information about missing archivelog exists in target DB not in auxiliary. So when I backup production DB I see missing archivelog file
          path in restored DB too....
          • 32. Re: RMAN duplicate database
            CKPT
            __OUTSIDER___ wrote:
            CKPT wrote:
            If already restored in Auxiliary server, Take backup of PFILE & drop the database(auxiliary)
            Old information about missing archivelog exists in target DB not in auxiliary. So when I backup production DB I see missing archivelog file
            path in restored DB too....
            Take a full backup again with archivelogs, make sure no errors in log file.
            • 33. Re: RMAN duplicate database
              __OUTSIDER___
              CKPT wrote:
              Take a full backup again with archivelogs, make sure no errors in log file.
              Hi, sorry for late response. I had some problems with DB server hardware.
              So what I did. As you suggested I take full DB backup with archivelog. I created catalog and all operations I did
              with RMAN catalog. After all I have same situation. RMAN wants old archivelog files but physically that file doesn't exists.

              Please help me to delete from RMAN catalog or controlfile wrong records about missing file.
               rman target sys/ora1024@XXX1  catalog rman/rman@XXX1 auxiliary /
              
              Recovery Manager: Release 10.2.0.5.0 - Production on Sat Mar 24 18:43:39 2012
              
              Copyright (c) 1982, 2007, Oracle.  All rights reserved.
              
              connected to target database: XXX (DBID=2990229593)
              connected to recovery catalog database
              connected to auxiliary database: XXX (not mounted)
              
              RMAN> run     
               {
              duplicate target database to XXX
              nofilenamecheck
              pfile=/tmp/aux.ora;
               }2> 3> 4> 5> 6>
              
              Starting Duplicate Db at 24-MAR-12
              allocated channel: ORA_AUX_DISK_1
              channel ORA_AUX_DISK_1: sid=155 devtype=DISK
              
              contents of Memory Script:
              {
                 set until scn  929623727;
                 set newname for datafile  1 to
              ******
              ******
               "/storage/oraData/XXX/ts_log_data002";
                 restore
                 check readonly
                 clone database
                 ;
              }
              executing Memory Script
              
              executing command: SET until clause
              
              Starting restore at 24-MAR-12
              using channel ORA_AUX_DISK_1
              
              channel ORA_AUX_DISK_1: restoring datafile 00001
              input datafile copy recid=198 stamp=778789152 filename=/storage/oracle_XXX_backup/XXX/datafile/o1_mf_system_7pvowd7q_.dbf
              destination for restore of datafile 00001: /u01/app/oracle/XXX/system01.dbf
              
                MAXLOGMEMBERS      3
                MAXDATAFILES      100
                MAXINSTANCES     8
                MAXLOGHISTORY     2920
               LOGFILE
                GROUP  1  SIZE 50 M ,
                GROUP  2  SIZE 50 M ,
                GROUP  3  SIZE 50 M
               DATAFILE
                '/u01/app/oracle/XXX/system01.dbf'
               CHARACTER SET WE8ISO8859P1
              
              
              contents of Memory Script:
              {
                 switch clone datafile all;
              }
              executing Memory Script
              
              datafile 2 switched to datafile copy
              input datafile copy recid=1 stamp=778791991 filename=/storage/oraData/XXX/xxx
              datafile 32 switched to datafile copy
              input datafile copy recid=30 stamp=778791996 filename=/storage/oraData/xxx/xxx
              
              contents of Memory Script:
              {
                 set until scn  929623727;
                 recover
                 clone database
                  delete archivelog
                 ;
              }
              executing Memory Script
              
              executing command: SET until clause
              
              Starting recover at 24-MAR-12
              using channel ORA_AUX_DISK_1
              
              starting media recovery
              
              archive log thread 1 sequence 28147 is already on disk as file /storage/oracle_XXX_backup/XXX/archivelog/2012_03_24/o1_mf_1_28147_7pvn1bf0_.arc
              archive log thread 1 sequence 28148 is already on disk as file /storage/oracle_XXX_backup/XXX/archivelog/2012_03_24/o1_mf_1_28148_7pvpfwb4_.arc
              archive log thread 1 sequence 28149 is already on disk as file /storage/oracle_XXX_backup/XXX/archivelog/2012_03_24/o1_mf_1_28149_7pvpg0lj_.arc
              unable to find archive log
              archive log thread=1 sequence=22139
              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/XXX/system01.dbf'
              
              RMAN-00571: ===========================================================
              RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
              RMAN-00571: ===========================================================
              RMAN-03002: failure of Duplicate Db command at 03/24/2012 19:07:00
              RMAN-03015: error occurred in stored script Memory Script
              RMAN-06054: media recovery requesting unknown log: thread 1 seq 22139 lowscn 727227244
              • 34. Re: RMAN duplicate database
                CKPT
                rman target sys/engineora1024#@XXX1 catalog rman/rman@XXX1 auxiliary /
                When you connect target database, No need to connect again Catalog database. Does your catalog is up to date with Target database?

                just connect as

                $rman target sys/engineora1024#@XXX1 auxiliary /

                Can you also check which backup piece/handle it is reading ? Better you post log file here.

                can you do work around as below?

                1) restore controlfile
                2) RMAN> restore database preview;

                Post output of this also.
                • 35. Re: RMAN duplicate database
                  __OUTSIDER___
                  CKPT wrote:
                  rman target sys/ora1024#@XXX1 catalog rman/rman@XXX1 auxiliary /
                  When you connect target database, No need to connect again Catalog database.
                  I just follow Oracle instructions...

                  Does your catalog is up to date with Target database?

                  I performed register database, after RMAN synced catalog with database.
                  How can I do sync again ? and is this operation I must do periodically ?
                  Can you also check which backup piece/handle it is reading ? Better you post log file here.

                  can you do work around as below?

                  1) restore controlfile
                  2) RMAN> restore database preview;
                  Sorry I must do these actions in production database or in auxiliary ?
                  • 36. Re: RMAN duplicate database
                    CKPT
                    I performed register database, after RMAN synced catalog with database.
                    How can I do sync again ? and is this operation I must do periodically ?
                    With connecting from target with catalog, RMAN> resync catalog;
                    Sorry I must do these actions in production database or in auxiliary ?
                    Auxiliary
                    • 37. Re: RMAN duplicate database
                      __OUTSIDER___
                      >
                      Can you also check which backup piece/handle it is reading ? Better you post log file here.

                      can you do work around as below?

                      1) restore controlfile
                      2) RMAN> restore database preview;

                      In which state must be aux database after failed duplication for restoring ?
                           
                      [oracle@fgdb2 ~]$ rman target /
                      
                      Recovery Manager: Release 10.2.0.5.0 - Production on Tue Mar 27 14:26:19 2012
                      
                      Copyright (c) 1982, 2007, Oracle.  All rights reserved.
                      
                      connected to target database: RBS (not mounted)
                      
                      RMAN> startup
                      
                      database is already started
                      database mounted
                      RMAN-00571: ===========================================================
                      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                      RMAN-00571: ===========================================================
                      RMAN-03002: failure of startup command at 03/27/2012 14:26:34
                      ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
                      
                      RMAN> restore controlfile
                      2> ;
                      
                      Starting restore at 27-MAR-12
                      using target database control file instead of recovery catalog
                      allocated channel: ORA_DISK_1
                      channel ORA_DISK_1: sid=159 devtype=DISK
                      
                      RMAN-00571: ===========================================================
                      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                      RMAN-00571: ===========================================================
                      RMAN-03002: failure of restore command at 03/27/2012 14:27:00
                      RMAN-06496: must use the TO clause when the database is mounted or open
                      
                      RMAN>
                      • 38. Re: RMAN duplicate database
                        PrafullaNath
                        Hi,

                        You can't restore the controlfile by putting the database in mount mode.

                        STEP1: Shutdown immediate; # shutdown ur database.

                        STEP2: startup nomount;

                        STEP3: rman target /
                        RMAN>set dbid 123456789
                        RMAN>restore controlfile

                        SETP4: once control file is restored strat the database in mount mode.

                        STEP5:restore other datafile and recover the database.
                        • 39. Re: RMAN duplicate database
                          CKPT
                          Hello,

                          I have given only very highlevel steps.

                          the actual command is to fire from NOMOUNT status
                          RMAN> restore controlfile from 'backup piece';

                          refer
                          http://docs.oracle.com/cd/B19306_01/backup.102/b14192/recov004.htm#CFABADJC
                          http://docs.oracle.com/cd/B19306_01/backup.102/b14192/recov004.htm
                          • 40. Re: RMAN duplicate database
                            __OUTSIDER___
                            Thanks guys for replies and for your help , I found the core of problem but unfortunately I can't solve it because this is really such a stupid situation. Before my action somebody deleted from OS many archivelog files but I don't know why Oracle needs exactly this old (2011) log file. I created RMAN repository catalog but this also didn't help me :(
                            • 41. Re: RMAN duplicate database
                              CKPT
                              __OUTSIDER___ wrote:
                              Thanks guys for replies and for your help , I found the core of problem but unfortunately I can't solve it because this is really such a stupid situation. Before my action somebody deleted from OS many archivelog files but I don't know why Oracle needs exactly this old (2011) log file. I created RMAN repository catalog but this also didn't help me :(
                              At the same time you have to look,
                              Any read only files available?
                              what happen when you do RMAN> restore database preview; -- i asked you couple of times to post RMAN duplicate log files also.
                              It is easy to analyze problem.
                              • 42. Re: RMAN duplicate database
                                __OUTSIDER___
                                Thanks for reply and help, I think this information can be helpful to do some specific restore ....
                                RMAN> restore database preview
                                2> ;
                                
                                Starting restore at 30-MAR-12
                                using channel ORA_DISK_1
                                List of Datafile Copies
                                Key     File S Completion Time Ckp SCN    Ckp Time        Name
                                ------- ---- - --------------- ---------- --------------- ----
                                4560    1    A 30-MAR-12       933653205  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_system_7qcgbf0c_.dbf
                                4555    2    A 30-MAR-12       933650443  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_inc_d_7qcfxo71_.dbf
                                4568    3    A 30-MAR-12       933655417  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_sysaux_7qcgnshc_.dbf
                                4562    4    A 30-MAR-12       933654105  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_users_7qcgghth_.dbf
                                4553    5    A 30-MAR-12       933649170  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_aggre_7qcfq2jw_.dbf
                                4569    6    A 30-MAR-12       933655773  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_inc_l_7qcgowo7_.dbf
                                4549    7    A 30-MAR-12       933642665  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_out_d_7qcdhy6r_.dbf
                                4552    8    A 30-MAR-12       933648416  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_out_i_7qcflk4m_.dbf
                                4571    9    A 30-MAR-12       933655951  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_card__7qcgpv6x_.dbf
                                4575    10   A 30-MAR-12       933656181  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_merch_7qcgr0bv_.dbf
                                4573    11   A 30-MAR-12       933656087  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_frdi__7qcgqkql_.dbf
                                4558    13   A 30-MAR-12       933651677  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_inc_i_7qcg4g74_.dbf
                                4556    14   A 30-MAR-12       933650855  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_aggre_7qcg00qd_.dbf
                                4576    15   A 30-MAR-12       933656233  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_rule__7qcgr7oh_.dbf
                                4551    16   A 30-MAR-12       933647300  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_inc_i_7qcfd3m8_.dbf
                                4570    17   A 30-MAR-12       933655857  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_out_i_7qcgpcxm_.dbf
                                4565    18   A 30-MAR-12       933655088  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_out_l_7qcglqfv_.dbf
                                4572    19   A 30-MAR-12       933656050  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_frdi__7qcgqbk9_.dbf
                                4577    20   A 30-MAR-12       933656321  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_merch_7qcgrgyt_.dbf
                                4557    21   A 30-MAR-12       933651304  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_out_i_7qcg2dz4_.dbf
                                4563    22   A 30-MAR-12       933654778  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_case__7qcgjtp9_.dbf
                                4578    23   A 30-MAR-12       933656384  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_rule__7qcgrp6l_.dbf
                                4564    24   A 30-MAR-12       933655002  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_inc_i_7qcgky0r_.dbf
                                4561    25   A 30-MAR-12       933653907  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_log_i_7qcgfd71_.dbf
                                4550    26   A 30-MAR-12       933645435  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_log_d_7qcf1b7h_.dbf
                                4554    27   A 30-MAR-12       933649923  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_log_d_7qcftow3_.dbf
                                4566    28   A 30-MAR-12       933655224  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_case__7qcgmjtv_.dbf
                                4574    29   A 30-MAR-12       933656122  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_card__7qcgqs1l_.dbf
                                4567    30   A 30-MAR-12       933655340  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_ts_frda__7qcgnb1w_.dbf
                                4559    31   A 30-MAR-12       933652421  30-MAR-12       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_undutbs0_7qcg65t3_.dbf
                                4579    32   A 30-MAR-12       727227244  11-OCT-11       /storage/oracle_XXX_backup/XXX/datafile/o1_mf_sysaux_7qcgrxdg_.dbf
                                
                                
                                List of Archived Log Copies
                                Key     Thrd Seq     S Low Time  Name
                                ------- ---- ------- - --------- ----
                                4523    1    28261   A 30-MAR-12 /storage/oracle_XXX_backup/XXX/archivelog/2012_03_30/o1_mf_1_28261_7qcdhk2j_.arc
                                4604    1    28262   A 30-MAR-12 /storage/oracle_XXX_backup/XXX/archivelog/2012_03_30/o1_mf_1_28262_7qcgt0jm_.arc
                                Media recovery start SCN is 727227244
                                Recovery must be done beyond SCN 933656384 to clear data files fuzziness
                                Finished restore at 30-MAR-12
                                • 43. Re: RMAN duplicate database
                                  CKPT
                                  Thank you,

                                  Just perform these steps,

                                  In your PFILE, Gracefully disable FRA related parameters Later you can enable it.

                                  1) Put in nomount
                                  RMAN> set dbid <dbid>
                                  2) Restore controlfile from the backup piece of Controlfile + SPFILE (or) controlfile
                                  RMAN> restore controlfile from 'backup piece'
                                  3) Put in mount
                                  4) Restore database as below

                                  run
                                  {
                                  set until scn 933656385;
                                  restore database;
                                  recover database;
                                  }

                                  SQL> alter database open resetlogs;

                                  If it is failed post your complete restore information log here.
                                  • 44. Re: RMAN duplicate database
                                    __OUTSIDER___
                                    1) Put in nomount
                                    RMAN> set dbid <dbid>
                                    2) Restore controlfile from the backup piece of Controlfile + SPFILE (or) controlfile
                                    RMAN> restore controlfile from 'backup piece'
                                    3) Put in mount
                                    4) Restore database as below

                                    run
                                    {
                                    set until scn 933656385;
                                    restore database;
                                    recover database;
                                    }

                                    SQL> alter database open resetlogs;

                                    If it is failed post your complete restore information log here.
                                    Again thanks dear friend for your help and time.
                                    Unfortunately the results is same and requested file also same.
                                    Here full output log.
                                    [oracle@fgdb2 /]$ rman target / catalog rman/rman@XXX1
                                    Recovery Manager: Release 10.2.0.5.0 - Production on Mon Apr 2 12:09:40 2012
                                    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
                                    connected to target database: XXX (not mounted)
                                    connected to recovery catalog database
                                    
                                    RMAN> set dbid 2990229593
                                    executing command: SET DBID
                                    database name is "XXX" and DBID is 2990229593
                                    
                                    RMAN> restore controlfile from '/storage/oracle_XXX_backup/XXX/autobackup/2012_04_02/o1_mf_s_779544490_7qln2                                                 wy0_.bkp'
                                    2> ;
                                    
                                    Starting restore at 02-APR-12
                                    allocated channel: ORA_DISK_1
                                    channel ORA_DISK_1: sid=159 devtype=DISK
                                    channel ORA_DISK_1: restoring control file
                                    channel ORA_DISK_1: restore complete, elapsed time: 00:00:04
                                    output filename=/u01/app/oracle/XXX/control01.ctl
                                    output filename=/u01/app/oracle/XXX/control02.ctl
                                    output filename=/u01/app/oracle/XXX/control03.ctl
                                    Finished restore at 02-APR-12
                                    
                                    RMAN> alter
                                    2> database mount;
                                    
                                    database mounted
                                    released channel: ORA_DISK_1
                                    
                                    RMAN> RUN {
                                    2> set until scn 933656385;
                                    3> restore database;
                                    4> recover database;
                                    5> }
                                    
                                    executing command: SET until clause
                                    Starting restore at 02-APR-12
                                    allocated channel: ORA_DISK_1
                                    channel ORA_DISK_1: sid=159 devtype=DISK
                                    
                                    skipping datafile 32; already restored to file /storage/oraData/XXX/ts_log_data002
                                    channel ORA_DISK_1: restoring datafile 00001
                                    input datafile copy recid=291 stamp=779309299 filename=/storage/oracle_XXX_backup/XXX/datafile/o1_mf_system_7qcgbf0c_.dbf
                                    destination for restore of datafile 00001: /u01/app/oracle/XXX/system01.dbf
                                    channel ORA_DISK_1: copied datafile copy of datafile 00001
                                    output filename=/u01/app/oracle/XXX/system01.dbf recid=312 stamp=779544806
                                    ********************
                                    output filename=/u01/app/oracle/XXX/undutbs0001.dbf recid=341 stamp=779546343
                                    Finished restore at 02-APR-12
                                    Starting recover at 02-APR-12
                                    using channel ORA_DISK_1
                                    starting media recovery
                                    archive log thread 1 sequence 28261 is already on disk as file /storage/oracle_XXX_backup/XXX/archivelog/2012_03_30/o1_mf_1_28261_7qcdhk2j_.arc
                                    archive log thread 1 sequence 28262 is already on disk as file /storage/oracle_XXX_backup/XXX/archivelog/2012_03_30/o1_mf_1_28262_7qcgt0jm_.arc
                                    unable to find archive log
                                    archive log thread=1 sequence=22139
                                    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/XXX/system01.dbf'
                                    
                                    RMAN-00571: ===========================================================
                                    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
                                    RMAN-00571: ===========================================================
                                    RMAN-03002: failure of recover command at 04/02/2012 12:39:49
                                    RMAN-06054: media recovery requesting unknown log: thread 1 seq 22139 lowscn 727227244