8 Replies Latest reply on Sep 12, 2019 10:22 AM by Dude!

    RMAN Control Files in FRA without ASM

    Erik Feijen

      How do i get a copy of a Control File in my FRA ?

       

      I can get it in my FRA but it doesn't show up when i do

      SELECT * FROM V$FLASH_RECOVERY_AREA_USAGE;

       

      I get the following:

       

      FILE_TYPE        PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES     CON_ID

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

      CONTROL FILE                 0               0           0          0

      REDO LOG                  1.95               0           3          0

      ARCHIVED LOG                   .61               0           1          0

      BACKUP PIECE                 44.15               0          11          0

      IMAGE COPY                 0               0           0          0

      FLASHBACK LOG                  7.16             2.6          11          0

      FOREIGN ARCHIVED LOG             0               0           0          0

      AUXILIARY DATAFILE COPY          0               0           0          0

       

      My parameters are:

      control_files string      C:\ORACLE\ORADATA\CFISTDIS\CTRL1_CFISTDIS.DBF, C:\ORACLE\ORADATA\CFISTDIS\CTRL2_CFISTDIS.DBF, D:\ORABACK\CFISTDIS\CONTROLEFILE\CTRL3_CFISTDIS.DBF

      db_recovery_file_dest     D:\OraBack\

       

        • 1. Re: RMAN Control Files in FRA without ASM
          EdStevens

          Erik Feijen wrote:

           

          How do i get a copy of a Control File in my FRA ?

           

          I can get it in my FRA but it doesn't show up when i do

          SELECT * FROM V$FLASH_RECOVERY_AREA_USAGE;

           

          I get the following:

           

          FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES CON_ID

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

          CONTROL FILE 0 0 0 0

          REDO LOG 1.95 0 3 0

          ARCHIVED LOG .61 0 1

          BACKUP PIECE 44.15 0 11 0

          IMAGE COPY 0 0 0 0

          FLASHBACK LOG 7.16 2.6 11 0

          FOREIGN ARCHIVED LOG 0 0 0 0

          AUXILIARY DATAFILE COPY 0 0 0 0

           

          My parameters are:

          control_files string C:\ORACLE\ORADATA\CFISTDIS\CTRL1_CFISTDIS.DBF, C:\ORACLE\ORADATA\CFISTDIS\CTRL2_CFISTDIS.DBF, D:\ORABACK\CFISTDIS\CONTROLEFILE\CTRL3_CFISTDIS.DBF

          db_recovery_file_dest D:\OraBack\

           

          How did you get your control files into the FRA.  Simply specifying the path of the FRA for a file destination doesn't do it.  For a file to be recognized as part of the FRA (and accounted for in the FRA usage) it must be placed there with 'FRA methods'.  ( The FRA is really just an accounting procedure.  It does not fence of the specified location to prevent files being placed/removed with simple OS commands.  )

           

          For things like archivelog files, this is accomplished by setting the destination like 'log_archive_dest_1=location=use_db_recovery_file_dest'.  However, I don't find similar syntax in the description of the CONTROL_FILES init parm.  And googling about didn't turn up anything that addressed this issue.  Some blogs purported to show how to put the control files in the FRA, but they did not address the issue of specifying to use the FRA vs simply specifying a directory that happens to be under the FRA location.

           

          As an aside, multiplexing all 3 of your control files into the same location isn't very wise.  If you lose one due to media failure, or even an ill-considered OS command, you will lose all of them.

          • 2. Re: RMAN Control Files in FRA without ASM
            Dude!

            From what I understand there isn't much else you an do than to place a copy of the controlfile in your recovery location and add it to the controlfile init parameter accordingly. I do, however, see a couple of potential problems in your case:

             

            Your db_recovery_file_dest is D:\OraBack, but the parameter uses ORABACK. Using .dbf for controlfiles is also unusual and should normally be .ctl. Perhaps correcting this will work.

            • 3. Re: RMAN Control Files in FRA without ASM
              Dude!

              Are you sure you're not confusing this with RMAN backup? If you configure FRA, backups automatically go into FRA without specifying the backup piece location. Oracle will not recognize backups in FRA when using the format clause, even if it points to FRA, however, this does not apply to the database controlfile. The controlfile in FRA uses either +FRA or the exact path when the target is a conventional filesystem.

              • 4. Re: RMAN Control Files in FRA without ASM
                CristianR-Oracle

                Do this:

                 

                SQL> select name,IS_RECOVERY_DEST_FILE from v$controlfile;

                 

                -- this will show that your controlfile are not in FRA

                 

                 

                SQL> alter system reset control_files;          --- reset the parmeter to null so that you can create an OMF

                SQL> startup force nomount;

                 

                 

                -- exit the SQL session and connect to RMAN

                 

                $ rman target /

                RMAN> restore controlfile from 'C:\ORACLE\ORADATA\CFISTDIS\CTRL1_CFISTDIS.DBF';

                 

                 

                -- exit RMAN and connect back to SQLPlus

                 

                $ sqlplus / as sysdba

                SQL> alter database mount;

                SQL> alter database open;

                SQL> select name,IS_RECOVERY_DEST_FILE from v$controlfile;  --- the IS_RECOVERY_DEST_FILE column should be YES now

                SQL> select * from v$flash_recovery_area_usage;   --- also this one should report that you have the controlfile in FRA

                • 5. Re: RMAN Control Files in FRA without ASM
                  EdStevens

                  Dude! wrote:

                   

                  Are you sure you're not confusing this with RMAN backup? If you configure FRA, backups automatically go into FRA without specifying the backup piece location. Oracle will not recognize backups in FRA when using the format clause, even if it points to FRA, however, this does not apply to the database controlfile. The controlfile in FRA uses either +FRA or the exact path when the target is a conventional filesystem.

                  Not confusing with it so much as extrapolating from it.

                  Perhaps incorrectly.

                   

                  I've never tried to place my control files under FRA control, but figured if everything else requires something akin to 'USE_RECOVERY_ARE' instead of an actual directory path, and if you DID supply an actual directory path that it would not be under FRA control or accounted for in FRA bookeeping ... then the same mechanism should be in play for control files.  Obviously the lack of syntax for that  specific usage is troublesome.

                  • 6. Re: RMAN Control Files in FRA without ASM
                    CristianR-Oracle

                    To place the controlfile in the FRA - the file must be an OMF one. You need to have the parameter  control_files set to NULL and db_recovery_file_dest set so that the newly created controlfile to be placed in FRA.

                    • 7. Re: RMAN Control Files in FRA without ASM
                      Dude!

                      DBCA doesn't seem to have a problem. The following shows the 19c dialog. It's not using OMF. ORACLE_BASE in my case is /u01/app/oracle and oradata is a symlin to /u02 and fast_recovery_area points to /u03.

                       

                      Let's see what happens if I query FRA later.... whether it see's the controlfile.

                       

                      • 8. Re: RMAN Control Files in FRA without ASM
                        Dude!

                        Interested myself, I ran a couple of tests and created 2 databases under 19c one with OMF (moan) and another one without (jawn).

                         

                        Here is the result:

                         

                        > SELECT * FROM V$FLASH_RECOVERY_AREA_USAGE;

                        (maon): CONTROL FILE   .12   0   1

                        (jawn):  CONTROL FILE     0   0   0

                         

                        > select name, IS_RECOVERY_DEST_FILE from v$controlfile;

                        (moan): /u01/app/oracle/oradata/MOAN/controlfile/o1_mf_gqn4tw7j_.ctl   NO

                                     /u01/app/oracle/fast_recovery_area/MOAN/controlfile/o1_mf_gqn4twdn_.ctl   YES

                        (jawn):  /u01/app/oracle/oradata/JAWN/control01.ctl   NO

                                    /u01/app/oracle/fast_recovery_area/JAWN/control02.ctl  NO

                         

                        Init Parameters:

                        (moan):  db_create_file_dest='/u01/app/oracle/oradata'

                                      db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'

                                     control_files='/u01/app/oracle/oradata/MOAN/controlfile/o1_mf_gqn4tw7j_.ctl',

                                                    '/u01/app/oracle/fast_recovery_area/MOAN/controlfile/o1_mf_gqn4twdn_.ctl'

                        (jawn): db_create_file_dest (not defined)

                                   db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'

                                   control_files='/u01/app/oracle/oradata/JAWN/control01.ctl',

                                                 '/u01/app/oracle/fast_recovery_area/JAWN/control02.ctl'

                         

                        So OMF did the trick.