The archive log file is a truncated backup of the redo log file, and two modes of Oracle running: Archive mode and no archive mode.
1. Enable/disable archiving mode
Sql>archive log list; Query Archive mode
Sql>shutdown Immediate
Sql>startup Mount
Sql>alter database Archivelog;
Sql>alter database open;
Sql>archive log list;
Database Log Mode Archive mode
Automatic Archival Enabled
Archive Destination Use_db_recovery_file_dest
Oldest online log sequence 38
Next log sequence to archive only 40
Current log Sequence 40
This parameter Log_archive_start is true before ora10, restart is active, automatic archiving is started, ORA10 is deactivated, the database is automatically archived when archive mode is enabled
。
Sql>show parameter Log_archive_start; No change required
2. Configure the location of the archive file
Sql>archive log list;
Sql>show parameter db_recovery_file_dest; View the location of the archive file
NAME TYPE VALUE
-----------------------------------------------------------------------------
Db_recovery_file_dest String/u01/app/oracle/flash_recovery _area
Db_recovery_file_dest_size Big Integer 2G
Sql>alter system Set
log_archive_dest= '/u01/app/oracle/oradata/ora10/' Scope=both;
Modify Archive File Error
Sql>alter system set log_archive_dest= ' Scope=both; This argument should be set to null first
Sql>alter system Set
log_archive_dest= '/u01/app/oracle/oradata/ora10/' Scope=both;
Modify successfully again
Sql>show parameter log_archive_dest; Check the location of the archive file again
Sql>host ls–l/u01/app/oracle/oradata/ora10/
Sql>alter system switch logfile; Manually switch logs to view the archive