Oracle archive mode and non-archive Mode settings

Source: Internet
Author: User

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.

  • 1
  • 2
  • Next Page

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.