Oracle Archive mode and non-archive mode Setup
Oracle's Log archive model effectively protects against instance and disk failures, is essential in database failure recovery, and needs to be set to archive mode as the Oracle initial installation mode is not in archive mode, and the following methods and steps are summarized, though simple, However, this is a prerequisite for managing Oracle databases and has the following statement.
Examples are based on Windows XP and oracle11g environments, and if the environment is different, just for reference.
Oracle Non-archive mode set to archive mode method steps:
1, run cmd command, open Sql*plus
C:\Documents and Settings\administrator>sqlplus/nolog
2, connecting to the database as Sysdba
Sql> Connect/as SYSDBA
3, if the database is open, first close the Unload database.
Sql> SHUTDOWN
4, open the database in Mount mode.
Sql> STARTUP MOUNT
5, querying the current archive mode
sql> ARCHIVE LOG LIST
Database log mode non-archive mode
AutoArchive disabled
Archive Endpoint Use_db_recovery_file_dest
The oldest online log sequence 1
Current log sequence 1
6, change the archive mode to Archivelog
sql> ALTER DATABASE Archivelog;
7, Requery archive mode
sql> ARCHIVE LOG LIST
Database log Mode archive mode
AutoArchive enabled
Archive Endpoint Use_db_recovery_file_dest
The oldest online log sequence 1
Next Archive log sequence 1
Current log sequence 1
8, open the database
sql> ALTER DATABASE OPEN;
The database archiving mode Setup has been completed, querying its archive mode in addition to archive LOG list method, can also be queried by v$database, the syntax is as follows:
Sql> select Log_mode from V$database;
Log_mode
------------
Archivelog
If you need to reset your database to a non-archive mode for special needs, you can refer to the following methods.
Oracle Archive mode set to non-archive mode method steps:
1, run cmd command, open Sql*plus
C:\Documents and Settings\administrator>sqlplus/nolog
2 connecting to the database as Sysdba
Sql> Connect/as SYSDBA
3, if the database is open, first close the Unload database.
Sql> SHUTDOWN
4, open the database in Mount mode.
Sql> STARTUP MOUNT
5, querying the current archive mode
sql> ARCHIVE LOG LIST
Database log Mode archive mode
AutoArchive enabled
Archive Endpoint Use_db_recovery_file_dest
The 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, Requery archive mode
sql> ARCHIVE LOG LIST
Database log mode non-archive mode
AutoArchive disabled
Archive Endpoint Use_db_recovery_file_dest
The oldest online log sequence 1
Current log sequence 1
8, open the database
sql> ALTER DATABASE OPEN;
You can also query by V$database syntax as follows:
Sql> select Log_mode from V$database;
Log_mode
------------
Noarchivelog
Ok! The conversion settings between the Oracle database archiving mode are complete for reference learning. If there are discrepancies, please refer to Oracle for help documentation.