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>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;
7,Requery archiving Mode
SQL>ARCHIVELOG LIST
Database Log ModeArchive Mode
Automatic archivingEnable
Archive endpointUSE_DB_RECOVERY_FILE_DEST
Earliest online log Sequence1
Next archive log Sequence1
Current Log Sequence1
8,Open Database
SQL>ALTERDatabase open;
The Archiving mode of the database has been set.ARCHIVELOG LISTYou can also useV $ databaseSyntax:
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
Database Log ModeArchive Mode
Automatic archivingEnable
Archive endpointUSE_DB_RECOVERY_FILE_DEST
Earliest online log Sequence1
Next archive log Sequence1
Current Log Sequence1
6. Change the archive mode to ARCHIVELOG.
SQL>Alter database noarchivelog;
7,Requery 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
8,Open Database
SQL>ALTERDatabase open;
You can also useV $ databaseSyntax:
SQL> select log_mode from v $ database;
LOG_MODE
------------
NOARCHIVELOG
OK! OracleThe conversion between database archive modes is complete for reference. For any discrepancies, seeOracleProvides help documentation.