Currently my backups are stored on the same filegroup as data. It is not a good practice because of a bunch of reasons. Some of them are:
- Restore and recovery in a case of a media failure might be impossible. As backups and data are located on the same disks, a media disaster affects both at the same time.
- Automatic space management: alerting, deleting not needed backups are accessible when using the Fast Recovery Area. It is a functionality that makes the administration a lot easier.
- Separating datafiles and backups improves performance of backups creation. If they are located on the same disks, making a backup reads datafiles and writes backup files from and to the same disks. If they are separated, a part of the transfer is moved to the backup disks.
- If backups are stored separately, a risk of rapidly reaching disk space limit is reduced. If backups are stored with datafiles, it may happen that by making a backup, all the space is fully consumed. As the same disks are also used for datafiles, the database crashes due to a lack of space.
Giving the above reasons, I want to enable the Fast Recovery Area to store recovery data.
Disable log_archive_dest and log_archive_duplex_dest
First, I make sure
log_archive_duplex_dest parameters are disabled.
select name, value
where name in ('log_archive_dest', 'log_archive_duplex_dest')
In my case the parameters are already disabled (VALUE is NULL). If yours are not, you can do that by running the following:
alter system set log_archive_duplex_dest = '';
alter system set log_archive_dest = '';
Configure the Fast Recovery Area
Set db_recovery_file_dest to FRA diskgroup.
alter system set db_recovery_file_dest = '+FRA';
Would you like to learn Liquibase in an organized way? Enroll to my course on Udemy.
October promotion - $13.
Promo code: OCT13USD
Set the Fast Recovery Area size. Oracle will not consume more than the defined value even if there is more space on disk. Make sure the value you set does not exceed real space available.
select g.name, sum(d.total_mb), sum(d.free_mb)
from v$asm_disk d
join v$asm_diskgroup g on d.group_number = g.group_number
where g.name = 'FRA'
group by g.name
It shows there is 10 172 MB of free space on FRA. I will set space to 10 000 MB.
alter system set db_recovery_file_dest_size = '10000M';
select name, value
where name in ('db_recovery_file_dest', 'db_recovery_file_dest_size')
It is done. The Fast Recovery Area is enabled.