4 Replies Latest reply on Feb 28, 2013 9:01 PM by Kelly Harrelson

    RMAN Duplicate restoring older version of file than expected

    Kelly Harrelson
      We are running 11.2.0.3.2.

      In my catalog for the "source" database (rman target db), I have the backupsets for a full database backup ended at Feb. 7, 03:43:37. These are online backups. So, there are archived redo logs being generated while it runs and the following archived redo logs finished at Feb. 7, 04:00:24.

      We duplicate databases all the time. So, this is not a new concept for us. The one thing that has changed is that we now back up to disk (using the flashback recovery area) and then later on, initiate a backup to tape. Prior to this go-live, we did all of our backups directly to tape. The catalog does not seem confused. It knows it needs to go to tape because it's beyond the retention for disk backups. The only problem is that it is going to the backup prior to the backupset I want, only for a couple of files.

      In the past, when all went directly to tape, we would do a set until time 'Feb. 7, 03:43:37' and it would automatically restore the backupset that finished then and apply archived redo logs as necessary to make a consistent copy. Now, if I use the same model, it's going to a backup set from the prior date for 3 particular files. If I change the time to when the archived redo logs ended their backup, 04:00, it still goes back to the day before, but only for 2 files.

      I can list a backup of each specific file and see that the file is in the backupset for which I expect RMAN to pull. How can I figure out a date/time to go back to if not using the method of reviewing the catalog entries and timestamps?

      If somebody wants to help, I would be happy to provide output for the catalog entries and the duplicate results.
        • 1. Re: RMAN Duplicate restoring older version of file than expected
          mseberg
          Hello;


          I can list a backup of each specific file and see that the file is in the backupset for which I expect RMAN to pull?

          You could join RC_BACKUP_DATAFILE_DETAILS with V$DATAFILE to get this information.


          How can I figure out a date/time to go back to if not using the method of reviewing the catalog entries and timestamps?

          I would avoid this by either doing a duplication from active database or doing a special backup for the duplicate.

          RMAN RUN {
          allocate channel d1 type disk;
          backup format '/u01/backups/RECOVER2/df_t%t_s%s_p%p' database;
          sql 'alter system archive log current';
          backup format '/u01/backups/RECOVER2/al_t%t_s%s_p%p' archivelog all;
          backup current controlfile '/u01/backups/RECOVER2/sb_t%t_s%s_p%p';
          release channel d1;
          }


          RMAN> list backup;

          Best Regards

          mseberg
          • 2. Re: RMAN Duplicate restoring older version of file than expected
            Kelly Harrelson
            Thanks for the response. I imagine when I join those two tables, I'll find that it matches what I'm seeing in the catalog details.

            As for the suggestions, I do appreciate them, but I can't really do either of those right now. The users want the refresh from a particular set of data that they've determined to be Feb 7. When it was Feb 7, they did not know that they would be requesting this particular refresh. So, no active and no special backup is available. :(

            I'm validating the files right now to see if there is some corruption as of yet undiagnosed.

            Thanks again.
            • 3. Re: RMAN Duplicate restoring older version of file than expected
              mseberg
              Hello again;

              I would not call that a duplicate. It seems more like a point in time recovery on another server. If this is correct than how you restore will depend upon how and what you backed up.

              If you have a full backup with archive and control file on tape then I would consider restoring that to the other server and proceeding.

              http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmflash.htm

              Best Regards

              mseberg
              • 4. Re: RMAN Duplicate restoring older version of file than expected
                Kelly Harrelson
                Thanks. I'll give that a try. We have been doing duplicates like this for years now. I know that RMAN's strength is not in this area, but in recovery, but we wanted the catalog and recovery capabilities and have just worked around the duplicate limitations/restrictions so we could have the DR benefits of the catalog and backups while maintaining our ability to refresh to create copies of production. I'll post back when I've tried this doc, probably tomorrow.

                Thanks again,
                Kelly