Oracle Archiving and non-archiving mode introduction __oracle

Source: Internet
Author: User
Tags sqlplus

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.

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.