Setting the Archive Redo File Locations- Managing Control Files, Online Redo Logs,and Archivelogs

18 Aug by Leondre Morris

Setting the Archive Redo File Locations- Managing Control Files, Online Redo Logs,and Archivelogs

Before you set your database mode to archiving, you should specifically instruct Oracle where you want the archive redo logs to be placed. You can set the archive redo log file destination with the following techniques:

•     Set the LOG_ARCHIVE_DEST_N database initialization parameter.

•     Implement FRA.

These two approaches are discussed in detail in the following sections.

Tip if you do not specifically set the archive redo log location via an initialization parameter or by enabling the Fra, then the archive redo logs are written to a default location. For production systems, the location should be specified and not use the default location.

The initialization parameters should be set for both LOG_ARCHIVE_DEST_N and LOG_ ARCHIVE_FORMAT. LOG_ARCHIVE _FORMAT includes a format with information about the thread, sequence number, and database ID.
This is the typical format:

You can set the several different locations for the archive redo log file destination. For most production systems, one archive redo log destination location is usually sufficient. You can view the value of the LOG_ARCHIVE_DEST_N parameter by running the following:

Besides the parameter, there is a view that you can query for details of the archive redo log locations and details:

Using the FRA for Archive Log Files

The FRA is an area on disk, defined in the database initialization parameters, that can be used to store files, such as archive redo logs, RMAN backup files, flashback logs, and multiplexed control files and online redo logs. To enable the use of FRA, you must set two initialization parameters:
• DB_RECOVERY_FILE_DEST_SIZE specifies the maximum space to be used for all files that are stored in the FRA for a database.
• DB_RECOVERY_FILE_DEST specifies the base directory for the FRA.

When you create an FRA, you are not really creating anything, but just telling the Oracle Database which directory to use when storing files that go in the FRA. For example, say 200GB of space is reserved on a mount point, and you want the base directory for the FRA to be /u01/fra. To enable the FRA, first set DB_RECOVERY_FILE_ DES_SIZE:

If you have set the LOG_ARCHIVE_DEST_N parameter to be a location on disk, archive redo logs will be written to LOG_ARCHIVE_DEST and not written to the FRA.

You can verify that the archive location is using FRA:SQL> archive log list; with this:

The files and directories are managed by these parameters, and you can actually use both the FRA and a non-FRA location by setting log_archive_dest_1 and 2 as follows:

Leave a Reply

Your email address will not be published. Required fields are marked *