Oracle DatabaseSwitchArchive ModeOperations and some related knowledge of the archive mode is what we will introduce in this article. Next we will begin to introduce this part of content. First, execute the following code:
- SQL> shutdown immediate;
- Database closed.
- Database dismounted.
- ORACLE instance shut down.
- SQL> startup mount;
- ORACLE instance started.Total System Global Area 205520896 bytes
- Fixed Size 1218532 bytes
- Variable Size 71305244 bytes
- Database Buffers 130023424 bytes
- Redo Buffers 2973696 bytes
- Database mounted.
- SQL> alter database archivelog;Database altered.SQL> alter database open;Database altered.SQL> archive log list;
- Database log mode Archive Mode
- Automatic archival Enabled
- Archive destination /oracle/app/oradata/LARRY/arch1
- Oldest online log sequence 184
- Next log sequence to archive 186
- Current log sequence 186
Switch archive Mode
View archiving Mode
- SQL> archive log list;
- Database Log mode: Non-archive mode; non-archive Mode
- Disable automatic archiving
- Archive end point c: \ oracle \ ora92 \ RDBMS
- The earliest log summary sequence 37
- Current Log sequence 39
- SQL> shutdown immediate
- The database has been closed.
- The database has been detached.
- ORACLE routine disabled
- SQL> startup mount;
- The ORACLE routine has been started.
- Total System Global Area 135338868 bytes
- Fixed Size 453492 bytes
- Variable Size 109051904 bytes
- Database Buffers 25165824 bytes
- Redo Buffers 667648 bytes
- The database has been loaded.
Enable archive Mode
- SQL> alter database archivelog;
- The database has been changed.
- SQL> alter database open;
- The database has been changed.
- SQL> archive log list;
- The archive mode of database logs is enabled.
- Disable automatic archiving
- Archive end point c: \ oracle \ ora92 \ RDBMS
- The earliest log summary sequence 37
- Next archive log sequence 39
- Current Log sequence 39
Configure the archiving process
SQL> ALTER SYSTEM SET LOG_ARCHIVE_MAX_PROCESSES = 3;
The system has been changed.
Configure archiving location
- SQL> ALTER SYSTEM SET log_archive_dest = 'C: \ oracle \ admin \ zrqhis \ arch '; the SYSTEM has been changed.
- SQL> ALTER SYSTEM SET log_archive_duplex_dest = 'C: \ oracle \ admin \ zrqhis \ arch_duplex_dest '; the SYSTEM has changed.
- SQL> archive log list;
- Database Log mode archiving Mode
- Disable automatic archiving
- Archive endpoint C: \ oracle \ admin \ zrqhis \ arch_duplex_dest. The storage location should be changed.
- The earliest log summary sequence 37
- Next archive log sequence 39
- Current Log sequence 39
Enable automatic archiving mode manually
- SQL> archive log start
- Processed statements
- SQL> archive log list;
- Database Log mode archiving Mode
- Enable automatic archiving
- Archive end point C: \ oracle \ admin \ zrqhis \ arch_duplex_dest
- The earliest log summary sequence 37
- Next archive log sequence 39
- Current Log sequence 39
Enable automatic archiving Mode
- SQL> Alter system set log_archive_start = true scope = spfile;
-
- The system has been changed.
-
- SQL> shutdown immediate;
- The database has been closed.
- The database has been detached.
- The ORACLE routine has been disabled.
- SQL> startup;
- The ORACLE routine has been started.
-
- Total System Global Area 135338868 bytes
- Fixed Size 453492 bytes
- Variable Size 109051904 bytes
- Database Buffers 25165824 bytes
- Redo Buffers 667648 bytes
- The database has been loaded.
- The database has been opened.
- SQL> archive log list;
- Database Log mode archiving Mode
- Enable automatic archiving
- Archive endpoint D: \ oracle \ oradata \ test2 \ archive
- Earliest Summary log sequence 5
- Next archive log sequence 7
- Current Log sequence 7 SVRMGR> alter system switch logfile; -- force the system to switch logs to immediately observe the generation of archived logs
- C: \ oracle \ admin \ zrqhis \ arch_duplex_dest
- Obtain: ARC00039.001.
This article describes how to switch the Oracle database to the archive mode and some operations related to the archive mode. I hope this introduction will be helpful to you!