"Oracle Series" turns on Oracle archiving mode

The archiving mode of Oracle database is turned off by default, and it needs to be turned on to perform HBR backup. This article introduces how to enable Oracle database archiving mode.

  1. sysdbaLog in to the database as Oracle.

  2. Execute SQLthe command ARCHIVE LOG LISTto query the archiving status of the current database.
    The return example is as follows:

    Database log mode              No Archive Mode  #非存档模式
    Automatic archival             Disabled
    Archive destination            USE_DB_RECOVERY_FILE_DEST  
    Oldest online log sequence     1    
    Current log sequence           2  
    

    Note: If Database log modethe parameter returns Archive Mode#archive mode, it means that Oraclethe archive mode is currently turned on.

  3. Since OPENthe archive mode cannot be enabled in the status, you need to execute SQLthe command SHUTDOWN IMMEDIATEto close the database.

    Note: Administrators are asked to operate during non-peak hours.

  4. Execute SQLthe command STARTUP MOUNTto start the database to MOUNTstate.

  5. Execute SQLcommand ALTER DATABASE ARCHIVELOGto start archive mode.

  6. SQLExecute the command again ARCHIVE LOG LISTto query the archive status.
    The return example is as follows:

    Databaselog mode             Archive Mode #存档模式
    Automatic archival           Enabled 
    Archive destination          USE_DB_RECOVERY_FILE_DEST 
    Oldest online log sequence   1
    Next log sequence to archive 2 
    Currentlog sequence          2
    

    Note: After it is turned on, Oraclethe default log archive path is the flashback recovery area ( $ORACLE_BASE/fast_recovery_area). This directory only has 4 GBspace by default. It is also the default path for backup files and flashback logs. To avoid database service abnormalities caused by insufficient disk space, you can adjust the space size of the directory or modify the log archive path as needed.

  7. Execute SQLthe command ALTER DATABASE OPENto start the database.

Guess you like

Origin blog.csdn.net/liuhuanping/article/details/133042892