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,
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,
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, close the uninstallation first.
SQL>SHUTDOWN
4. Open the database in mount mode.
SQL>STARTUP MOUNT
5. query the current archiving Mode
SQL>ARCHIVELOG 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;
SQL>ARCHIVELOG LIST
Archive endpoint USE_DB_RECOVERY_FILE_DEST
Earliest online log Sequence 1
Next archive log Sequence 1
Current Log Sequence 1
SQL>ALTERDatabase open;
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>ARCHIVELOG LIST
Archive endpoint USE_DB_RECOVERY_FILE_DEST
Earliest online log Sequence 1
Next archive log Sequence 1
Current Log Sequence 1
6. Change the archive mode to ARCHIVELOG.
SQL>Alter database noarchivelog;
SQL>ARCHIVELOG 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
SQL>ALTERDatabase open;
SQL> select log_mode from v $ database;
LOG_MODE
------------
NOARCHIVELOG