How to Move the Flash Recovery Area location in Oracle

      Sometimes because of space requirements or other reasons we need to change the FRA(Flash Recovery Area) location. This task requires you to stop and start your Oracle instance. I will go thrum all of the steps that are needed to be done in order to complete the relocation of your FRA(Flash Recovery Area) location.

1 - You need to have your new area created(the directory) and make sure that the Oracle user has the appropriate rights over the directory.

2 - Open a SQL command line and alter the value of the DB_RECOVERY_FILE_DEST parameter using the bellow syntax:

sql:alter system set DB_RECOVERY_FILE_DEST='new FRA location path' SCOPE=BOTH SID=*;
At this point the all new Flash Recovery Area files will be created in the new location.

3- Make the new changes available at this point you need to restart your database

--Shutdown the Database

  SQL shutdown;
--Startup mount the Database:

  SQL startup mount;
--Toggle the Flashback off:

  SQL alter database flashback off;
--Toggle the Flashback on:

  SQL alter database flashback on;
--Open the Database:

  SQL alter database open;

4- Move your current permanent files, transient files, to the new Flash Recovery Area, then follow the following steps:

4.1 -- To move the existing backup sets and archived redo log files,use the following

command:

   RMAN BACKUP AS COPY ARCHIVELOG ALL DELETE INPUT;
   RMAN BACKUP DEVICE TYPE DISK BACKUPSET ALL DELETE INPUT;

4.2 -- To move the datafile copies. Run the below command for each data file copy:

   RMAN BACKUP AS COPY DATAFILECOPY  DELETE INPUT;
-where the is the datafilecopy name in the old recovery area.

4.3 -- To move the control file from the old Flash Recovery Area to new one. Run the following command with database in NOMOUNT state.

   RMAN RESTORE CONTROLFILE FROM 'filename_of_old_control_file';

4.4 -- To move the online redo logs. Use the commands to add a a log file stored in the new Flash Recovery Area and drop the logfile in the old Flash Recovery Area for each redo log group.

   SQL alter database add logfile size 100M;
   SQL alter database drop logfile 'name of the old redo log';
Oracle will clean up transient files remaining in the old Flash Recovery Area location as they become eligible for deletion.