Introduction to oracle archive and non-archive Modes

Source: Internet
Author: User

Introduction to oracle archive and non-archive Modes

Oracle archive mode and non-archive Mode settings

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> ARCHIVE LOG 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. query the archive mode again.

SQL> ARCHIVE LOG LIST

Database Log mode archiving Mode

Enable automatic archiving

Archiving end point 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 DATABASE OPEN;

The database ARCHIVE mode setting has been completed. In addition to the archive log list method, you can also query the ARCHIVE mode using 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-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> ARCHIVE LOG LIST

Database Log mode archiving Mode

Enable automatic archiving

Archiving end point 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. query the archive mode again.

SQL> ARCHIVE LOG 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 the database

SQL> ALTER DATABASE OPEN;

You can also use v $ database to query data. The syntax is as follows:

SQL> select log_mode from v $ database;

LOG_MODE

------------

NOARCHIVELOG

OK! The Oracle Database archive mode conversion is complete for reference. For any discrepancies, see oracle 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.