13 Replies Latest reply on Aug 13, 2010 1:35 PM by Terry

    RMAN duplicate RMAN-06023: no backup or copy of datafile

    user9074881
      I'm a bit confused why I'm having the problem I'm encountering. I'm running 10.2.0.4. I'm executing a disk backup followed by an immediate Duplicate. I also tried to only do a duplicate with no initial backup, but with the same results. This was previously working, i have no idea why it isn't no longer. I don't recall changing anything.
      Regarding the duplicate step during an auxiliary copy, do I require a backup copy before a duplicate is made, or could I create a duplicate directly without creating a backup first? To me, it appears that you could bypass having to do a copy and do it all within one step with a duplicate, however a duplicate still creates an intermediate backup copy. During duplicate you don't specify a database tag, so how does it know which backup piece to restore if you had an initial backup?

      Any help or insight would be appreciated. Thanks

      RUN {
      allocate channel C1a type disk connect 'sys/oracle@etf-1';
      configure controlfile autobackup on;
      backup as copy database tag 'clonecopy' format '+ETF_DG/%d/datafile_%f_clone.dbf';
      }

      RUN {
      ALLOCATE AUXILIARY CHANNEL C4d DEVICE TYPE DISK;
      duplicate target database to 'clone'
      pfile='/oracle/mgmt/bin/initclone-1.ora';
      }


      RMAN-03002: failure of Duplicate Db command at 06/17/2010 23:27:37
      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 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
        • 1. Re: RMAN duplicate RMAN-06023: no backup or copy of datafile
          Hemant K Chitale
          This was previously working, i have no idea why it isn't no longer
          Are you sure that it was in the 10.2.0.4 environment ?

          Active database duplication is an 11g feature. 10g requires a backup to have been created and copied to the auxiliary server before you can issue the DUPLICATE DATABASE command.


          See http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmdupdb.htm#i1008564
          and "Restrictions and Usage Notes" on the DUPLICATE DATABASE command at
          http://download.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta028.htm#RCMRF126

          Hemant K Chitale
          http://hemantoracledba.blogspot.com

          Edited by: Hemant K Chitale on Jun 18, 2010 10:52 AM
          • 2. Re: RMAN duplicate RMAN-06023: no backup or copy of datafile
            user9074881
            I think the major difference between 10g and 11g is that there is no backup image in 11g, it directly creates a duplicate copy. However, during a duplicate copy in 10g a backup image is still created and from that backup a duplicate copy created there after. At least that what was my understanding. Either way, I'm creating a copy first and recovering a duplicate copy after and my only concern is understanding why it can't locate the backup. Yes, I am working on 10g. I'm taking a disk backup of a database within the same ASM diskgroup. I create a duplicate copy immediately after.

            It goes back to the question, how does RMAN know which backup piece to restore, you don't specify a database tag during the duplicate copy step. My first step successfully produces a backup, but during the second phase of taking an auxiliary copy of the backup, it's not aware of it.


            Any help or insight would be appreciated.
            • 3. Re: RMAN duplicate RMAN-06023: no backup or copy of datafile
              rajeysh
              how does RMAN know which backup piece to restore
              Mechanics of Restore Operations

              RMAN automates the procedure for restoring files. You do not need to go into the operating system, locate the backup that you want to use, and manually copy files into the appropriate directories. When you issue a RESTORE command, RMAN directs a server session to restore the correct backups to either:

              * The default location, overwriting the files with the same name currently there
              * A new location, which you can specify with the SET NEWNAME command

              To restore a datafile, either mount the database or keep it open and take the datafile to be restored offline. When RMAN performs a restore, it creates the restored files as datafile image copies and records them in the repository.

              refer the link for more information
              http://download.oracle.com/docs/cd/B12037_01/server.101/b10734/rcmconc2.htm

              Edited by: rajeysh on Jun 18, 2010 11:07 AM
              • 4. Re: RMAN duplicate RMAN-06023: no backup or copy of datafile
                Hemant K Chitale
                The auxiliary instance must be able to access the backup at the same path as was created at the primary instance.

                See this paragraph under "Restrictions and Usage Notes" in the documentation on the DUPLICATE DATABAES command.
                If the target and duplicate databases reside on different hosts, then you must do one of the following tasks for duplication to be successful:
                
                Move backups and disk copies from the target host to the duplicate host to the same location as the target host so that the path names are identical
                
                Move backups and disk copies from the target host to the duplicate host to a new location (so that the path names are different), and then CATALOG them.
                
                Make sure that all backups and copies (disk or sbt) on the target host are remotely accessible from the duplicate host. Make sure that the archived redo logs are available in the expected location in the new host.
                Hemant K Chitale
                • 5. Re: RMAN duplicate RMAN-06023: no backup or copy of datafile
                  user9074881
                  I understand the general concepts of RMAN. Thanks for trying to help.
                  • 6. Re: RMAN duplicate RMAN-06023: no backup or copy of datafile
                    rajeysh
                    if you get the solution, Mark the thread as answered.
                    • 7. Re: RMAN duplicate RMAN-06023: no backup or copy of datafile
                      user12006502
                      I'll mark the thread as answered and give out points once I find a solution or get any help resolving it. As of now, I'm in the same spot as I was when I opened the thread. I have no idea why it's not working and I haven't got any more of an understanding into the issue.
                      • 8. Re: RMAN duplicate RMAN-06023: no backup or copy of datafile
                        Fahd.Mirza
                        Full restore is not possible when a datafile is missing and you have never backed it up. RMAN does not automatically recreate a missing datafile. You must either recreate it manually before invoking RMAN, or add some sql-statements to the rman script.
                        • 9. Re: RMAN duplicate RMAN-06023: no backup or copy of datafile
                          rajeysh
                          do I require a backup copy before a duplicate is made, or could I create a duplicate directly 
                          without creating a backup first? 
                          without backup , RMAN cannot create a duplicate database? of course you must have valid backup of the target database which you are going to duplicate.
                          RMAN> backup database plus archivelog;
                          During duplicate you don't specify a database tag, 
                          so how does it know which backup piece to restore if you had an initial backup?
                          RMAN automates the procedure for restoring files._
                          You don't need to go into the operating system, locate the backup that you want to use, and manually copy files into the appropriate directories.
                          When you issue a RESTORE command, RMAN directs a server session to restore the correct backups to either:_

                          * The default location, overwriting the files with the same name currently there
                          * A new location, which you can specify with the SET NEWNAME command

                          refer:
                          to create a duplicate database on:
                          * A remote server with the same file structure
                          * A remote server with a different file structure
                          * The local server with a different file structure
                          http://www.akadia.com/services/ora_duplicate_database_rman.html
                          • 10. Re: RMAN duplicate RMAN-06023: no backup or copy of datafile
                            user9074881
                            I don't understand why I'm receiving RMAN-06023: no backup or copy of datafile. I take a backup and run a duplicate after. It appears to me that RMAN can't locate the backup. I pasted the backup and duplicate step I take. Does anyone see anything wrong with my process?
                            • 11. Re: RMAN duplicate RMAN-06023: no backup or copy of datafile
                              tychos
                              Hi user9074881,
                              Does anyone see anything wrong with my process?
                              Are you able to see the backup in < +ETF_DG/%d/ > on the host which runs the auxiliary instance?
                              Are both databases running on the same system?
                              Can you try if works when the backup is located on a normal filesystem?
                              Regards,
                              Tycho

                              Edited by: tychos on 23-jun-2010 8:09
                              • 12. Re: RMAN duplicate RMAN-06023: no backup or copy of datafile
                                user9074881
                                Yes, they are both on the same Diskgroup.
                                • 13. Re: RMAN duplicate RMAN-06023: no backup or copy of datafile
                                  Terry
                                  Check RMAN RESTORE fails with RMAN-06023 or ORA-19505 or RMAN-06100 inspite of proper backups [ID 457769.1]

                                  Also try resetting your logs and doing a fresh backup on the target database, then try your duplicate again.