Introduction to oracle archive and non-archive Modes
Oracle archive mode and non-archive Mode settings
The log archiving mode of Oracle can effectively prevent instance and disk faults and is indispensable for database fault recovery. Because the initial installation mode of oracle is not the archive mode, therefore, you need to set it to archive mode. The following describes the methods and steps. Although simple, this is a necessary task for managing oracle databases. Therefore, the following table is provided.
The example is based on Windows XP and oracle11g. if the environment is different, it is for reference only.
To set the Oracle non-archive mode to archive mode, follow these steps:
1. Run the cmd command to enable SQL * plus.
C: \ Documents ents and Settings \ Administrator> sqlplus/nolog
2. Connect to the database as sysdba
SQL> CONNECT/AS SYSDBA
3. If the database is opened, first stop uninstalling the database.
SQL> SHUTDOWN
4. Open the database in mount mode.
SQL> STARTUP MOUNT
5. query the current archiving Mode
SQL> ARCHIVE LOG LIST
Database Log mode non-archive Mode
Disable automatic archiving
Archiving end point USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 1
Current Log sequence 1
6. Change the archive mode to ARCHIVELOG.
SQL> ALTER DATABASE ARCHIVELOG;
7. query the archive mode again.
SQL> ARCHIVE LOG LIST
Database Log mode archiving Mode
Enable automatic archiving
Archiving end point USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 1
Next archive log sequence 1
Current Log sequence 1
8. Open the database
SQL> ALTER DATABASE OPEN;
The database ARCHIVE mode setting has been completed. In addition to the archive log list method, you can also query the ARCHIVE mode using v $ database. The syntax is as follows:
SQL> select log_mode from v $ database;
LOG_MODE
------------
ARCHIVELOG
If you need to reset the database to non-archive mode for special purposes, you can refer to the following method.
Steps for setting the Oracle archive mode to non-archive mode:
1. Run the cmd command to enable SQL * plus.
C: \ Documents ents and Settings \ Administrator> sqlplus/nolog
2. Connect to the database as sysdba
SQL> CONNECT/AS SYSDBA
3. If the database is opened, first stop uninstalling the database.
SQL> SHUTDOWN
4. Open the database in mount mode.
SQL> STARTUP MOUNT
5. query the current archiving Mode
SQL> ARCHIVE LOG LIST
Database Log mode archiving Mode
Enable automatic archiving
Archiving end point USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 1
Next archive log sequence 1
Current Log sequence 1
6. Change the archive mode to ARCHIVELOG.
SQL> ALTER DATABASE NOARCHIVELOG;
7. query the archive mode again.
SQL> ARCHIVE LOG LIST
Database Log mode non-archive Mode
Disable automatic archiving
Archiving end point USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 1
Current Log sequence 1
8. Open the database
SQL> ALTER DATABASE OPEN;
You can also use v $ database to query data. The syntax is as follows:
SQL> select log_mode from v $ database;
LOG_MODE
------------
NOARCHIVELOG
OK! The Oracle Database archive mode conversion is complete for reference. For any discrepancies, see oracle help documentation.