Enable ARCHIVELOG mode for an Oracle database

更新时间:
复制 MD 格式

By default, an Oracle database runs in NOARCHIVELOG mode, which limits recovery to the point of the last backup. To support incremental backups and point-in-time recovery with Cloud Backup, switch the database to ARCHIVELOG mode before enabling backup.

  1. Log in to the Oracle database as a sysdba.

  2. Run the ARCHIVE LOG LIST SQL command to check the current archive status.

    Database log mode              No Archive Mode  #NOARCHIVELOG mode
    Automatic archival             Disabled
    Archive destination            USE_DB_RECOVERY_FILE_DEST  
    Oldest online log sequence     1    
    Current log sequence           2  
    Note

    If the Database log mode parameter shows Archive Mode, ARCHIVELOG mode is already enabled. No further steps are needed.

  3. ARCHIVELOG mode cannot be enabled while the database is in the OPEN state. Run the SHUTDOWN IMMEDIATE SQL command to shut down the database.

    Important

    Perform this operation during off-peak hours.

  4. Run the STARTUP MOUNT SQL command to start the database in MOUNT state.

  5. Run the ALTER DATABASE ARCHIVELOG SQL command to enable ARCHIVELOG mode.

  6. Run the ARCHIVE LOG LIST SQL command again to verify that ARCHIVELOG mode is enabled.

    Database log mode              Archive Mode  #ARCHIVELOG mode
    Automatic archival             Enabled
    Archive destination            USE_DB_RECOVERY_FILE_DEST
    Oldest online log sequence     1
    Next log sequence to archive   2
    Current log sequence           2
    Note

    After enabling ARCHIVELOG mode, the default log archive path is the fast recovery area ($ORACLE_BASE/fast_recovery_area). This directory has a default size of 4 GB and is shared with backup files and flashback logs. To prevent disk exhaustion from causing database outages, increase the directory size or change the log archive path.

  7. Run the ALTER DATABASE OPEN SQL command to open the database.