8 Replies Latest reply: Aug 13, 2013 12:28 PM by KenTheTrog RSS

    RMAN file order

    KenTheTrog

      In what order does rman backup and recover datafiles?

       

      Is it by # of changes with the system ts df last?

       

      Thanks!

      -Ken

        • 1. Re: RMAN file order
          sb92075

          KenTheTrog wrote:

           

          In what order does rman backup and recover datafiles?

           

          Is it by # of changes with the system ts df last?

           

          Thanks!

          -Ken

          Please explain  why the answer matters.

          How will you act differently after learning this minutiae?

          • 2. Re: RMAN file order
            Arun#

            Use the following Query to find out yourself :-

             

            SELECT FILE#, INCREMENTAL_LEVEL, COMPLETION_TIME, BLOCKS, DATAFILE_BLOCKS

              FROM V$BACKUP_DATAFILE

              WHERE INCREMENTAL_LEVEL > 0

              ORDER BY COMPLETION_TIME;

            • 3. Re: RMAN file order
              KenTheTrog

              Fair question, but if you don't know the answer, please refrain from replying.

               

              I'm monitoring a very large recovery and I'd just like to know.

              • 4. Re: RMAN file order
                KenTheTrog

                Thanks for the SQL Arun, there doesn't seem to be an obvious pattern.

                 

                     FILE# INCREMENTAL_LEVEL COMPLETIO     BLOCKS DATAFILE_BLOCKS

                ---------- ----------------- --------- ---------- ---------------

                        66                 0 10-AUG-13     164359          262144

                        78                 0 10-AUG-13     392713          393216

                        79                 0 10-AUG-13     301127          393216

                        72                 0 10-AUG-13     129725          262144

                        26                 0 10-AUG-13         89          131072

                        58                 0 10-AUG-13         33          131072

                        60                 0 10-AUG-13     257427          265344

                        59                 0 10-AUG-13         58          131072

                        71                 0 10-AUG-13     176978          262144

                        81                 0 10-AUG-13         33          131072

                        82                 0 10-AUG-13         45          131072

                        85                 0 10-AUG-13         33          131072

                        86                 0 10-AUG-13         45          131072

                        87                 0 10-AUG-13         33          131072

                        76                 0 10-AUG-13     162095          262144

                 

                There must be some method for the way datafiles are queued up for channels.  Seems to me the restore just reverses the order since it just reads them back in from the backup pieces as they were layed out.

                • 5. Re: RMAN file order
                  Arun#

                  Welcome Ken,

                   

                  As far as I know, RMAN allocate channels in numerical order. Read this document to get a clear picture.

                   

                  Regds,

                   

                  Arun

                  • 6. Re: RMAN file order
                    JohnWatson

                    KenTheTrog wrote:

                     

                    In what order does rman backup and recover datafiles?

                     

                    As far I can remember, if you specify fileperset=1 the files are backed up in order of size descending. If you have filesperset > 1 it becomes more complicated as RMAN attempts to combine files of similar size in each backupset. Remember that files in a set are interleaved, so in effect backed up concurrently.

                    • 7. Re: RMAN file order
                      Alvaro

                      For recovery purposes it also depends on how many channels you configured.

                      • 8. Re: RMAN file order
                        KenTheTrog

                        Question:

                        Assuming a single channel and filesperset=1, what order does RMAN choose to backup datafiles?


                        Answer:

                        The order of files is random. The File Names are read from V$DATAFILE view and due to performance bug, the ORDER BY FILE# clause is removed, hence the query can return file# in random order.