Oracle Archive mode and non-archive mode settings

Source: Internet
Author: User
Tags sqlplus

(Transferred from: http://www.cnblogs.com/spatial/archive/2009/08/01/1536429.html)

Oracle's log archiving model effectively prevents instance and disk failures and is essential in database failure recovery, since Oracle's initial installation mode is non-archive mode, so it needs to be set to archive mode, which summarizes its methods and steps, though simple, However, this is a prerequisite for managing Oracle databases, so the following statements are made.

Examples are built in the environment of WindowsXP and ORACLE11G, if there are different environments, for reference only.

The Oracle non-archive mode is set to the archive mode method step:

1, run cmd command, open Sql*plus C:\Documents and Settings\administrator>sqlplus/nolog

2, connect database sql> Connect/as SYSDBA as SYSDBA identity

3, if the database is open, first close the Unload database. Sql> SHUTDOWN

4. Open the database in Mount mode. Sql> STARTUP MOUNT

5, query current archive mode sql> ARCHIVE log LIST database log mode non-archive mode AutoArchive disable archive endpoint 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 archive mode sql> ARCHIVE log LIST database log mode archive Mode AutoArchive enable archive endpoint 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 DB Open; Database archiving mode setting has been completed, query its archive mode in addition to the archive LOG list method, can also be queried through 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-archival mode due to special needs, you can refer to the following methods.

Oracle archiving mode is set to non-archive mode method steps:

1, run cmd command, open Sql*plus C:\Documents and Settings\administrator>sqlplus/nolog

2, connect database sql> Connect/as SYSDBA as SYSDBA identity

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 enable archive endpoint 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, Requery archive mode sql> ARCHIVE log LIST database log mode non-archive mode AutoArchive disable archive endpoint use_db_recovery_file_dest oldest online log sequence 1 current log sequence 1

8. Open the database sql> ALTER DB Open; Can also be queried through v$database, the syntax is as follows: Sql> select Log_mode from V$database;

Log_mode------------

Noarchivelog

Ok! The conversion between Oracle Database archiving mode is set up for reference learning.

Oracle Archive mode and non-archive mode settings

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.