Alter Database Archivelog Enable

Configure multiple archive log file destinations to increase availability:

    Before we can configure multiple archive log file destination, we must ensure that the database is running in ARCHIVELOG mode. The following steps show how to enable this mode.
  1. Verify if database is in ARCHIVELOG mode

  2. Set initialization parameters

    As stated in this doc, we must specify the destination using the LOG_ARCHIVE_DEST initialization parameter is we are to archive to only a single destination. To archive to multiple destinations, we can choose to archive to two or more locations using the LOG_ARCHIVE_DEST_n initialization parameters, or to archive only to a primary and secondary destination using the LOG_ARCHIVE_DEST and LOG_ARCHIVE_DUPLEX_DEST initialization parameters.

    LOG_ARCHIVE_FORMAT is not a dynamic parameter, so the database needs to be bounced for the change to take effect.

    Check out this doc for the list of variables that can be used in the LOG_ARCHIVE_FORMAT.

  3. Shutdown the database

  4. Startup in mount mode

  5. Enable ARCHIVELOG

  6. Open the database

    Here’s how to force log switch:

    The easiest way to check the metadata of the archive logs is through OEM as shown below.

Oracle Database lets you save filled groups of redo log files to one or more offline destinations, known collectively as the archived redo log, or more simply the archive log.The process of turning redo log files into archived redo log files is called archiving.This process is only possible if the database is running in ARCHIVELOGmode. By default, database runs in no archivelog mode. Enable archivelog mode alter database archivelog; 5. Change the clusterdatabase parameter back to true in the spfile (or pfile manually) alter system set clusterdatabase=true scope=spfile; 6. Shutdown the instance shutdown immediate 7. Startup the database using srvctl srvctl start database -d TEST 8. Verify the change sqlplus / as sysdba.

Configure the Flash Recovery Area:

RMAN Switching to Archivelog Mode. The Oracle database stores all the changes that are done in the redo log files. These files are used in the cyclical manner and the background process LGWR. (log writer) keeps on writing to them again and again. Where is the name of the database $ sqlplus /nolog SQL connect / as sysdba; To enable ARCHIVELOG mode status, enter the following SQL commands: SQL Shutdown SQL Startup mount SQL Alter database archivelog; SQL alter database open; To check the ARCHIVELOG mode status, enter the following SQL command. Total System Global Area 417546240 bytes Fixed Size 2213936 bytes Variable Size 301991888 bytes Database Buffers 109051904 bytes Redo Buffers 4288512 bytes Database mounted. SQL alter database archivelog; Database altered. Open the database and check the result. SQL alter database open; Database altered. SQL SQL select logmode from v.

Alter Database Archivelog Enable


When using FRA, RMAN will automatically purge when backups are obsolete. If FRA is not configured, you’ll have to manually delete backups as they go pass the retention policy.

Retention policy applies only to full backups (level 0). You can set retention by REDUNDANCY, which refers to a certain number of backups, or by RECOVERY_WINDOW, which refers to a certain number of days. Check out this doc for more info regarding backup retention policy.

To verify if FRA is configured, you can check the values of the following parameters.

To customize the FRA location and size, you can run

Then, bounce the database.

You can also configure or customize FRA through OEM as shown below.

Define, apply and use a retention policy:

To check the current retention policy, login to RMAN and run

If you want to retain backups by REDUNDANCY (ex. retain 2 backups), you can run

Or if you want to configure retention by RECOVERY_WINDOW (ex. 4 days), run

In case you want to clear retention policy, just set the policy to NONE as shown below.

Alter Database Oracle

Backup retention policy settings can also be changed in OEM as shown below.