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.
-
sysdba
Log in to the database asOracle
. -
Execute
SQL
the commandARCHIVE LOG LIST
to 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 mode
the parameter returnsArchive Mode
#archive mode, it means thatOracle
the archive mode is currently turned on. -
Since
OPEN
the archive mode cannot be enabled in the status, you need to executeSQL
the commandSHUTDOWN IMMEDIATE
to close the database.Note: Administrators are asked to operate during non-peak hours.
-
Execute
SQL
the commandSTARTUP MOUNT
to start the database toMOUNT
state. -
Execute
SQL
commandALTER DATABASE ARCHIVELOG
to start archive mode. -
SQL
Execute the command againARCHIVE LOG LIST
to 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,
Oracle
the default log archive path is the flashback recovery area ($ORACLE_BASE/fast_recovery_area
). This directory only has4 GB
space 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. -
Execute
SQL
the commandALTER DATABASE OPEN
to start the database.