Introduction to Oracle Archiving and non-archival modes

Source: Internet
Author: User

Oracle Archive mode and non-archive mode settings

Oracle 's log archiving mode effectively prevents instance and disk failures and is essential in database failure recovery due to the non-archival mode of Oracle 's initial installation mode, So you need to set it up as an archive mode, here are some summary of its methods and procedures, although simple, but this is necessary to manage the Oracle database, so the following statements.

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 the cmd command to open the sql*plus

C:\Documents and settings\administrator>sqlplus/nolog

2, connect to 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 End 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, re-query the archive mode

sql> ARCHIVE LOG LIST

Database log Mode Archive Mode

Auto Archive enabled

Archive end Point Use_db_recovery_file_dest

the oldest online log sequence 1

next archived log sequence 1

Current log sequence 1

8. Open the database

sql> ALTER DATABASE OPEN;

The database archiving mode setting has been completed, querying its archive mode in addition to ARCHIVE The LOG LIST method can also be queried by v$database , with the following syntax:

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 the cmd command to open the 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

Auto Archive enabled

Archive end Point Use_db_recovery_file_dest

the oldest online log sequence 1

next archived log sequence 1

Current log sequence 1

6, change the archive mode to ARCHIVELOG

sql> ALTER DATABASE noarchivelog;

7, re-query the archive mode

sql> ARCHIVE LOG LIST

Database log mode non-archive mode

AutoArchive disabled

Archive End 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 pass V$database to query, 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. If there are discrepancies, please refer to Oracle for help documentation.

Introduction to Oracle Archiving and non-archival modes

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.