Oracle Archive mode and non-archive mode

Source: Internet
Author: User

What is Oracle archive mode?

The Oracle database has an online redo log, which records changes made to the database, such as inserting, deleting, updating data, etc., which are recorded in the online redo log. A generic database must have at least 2 online redo log groups. When an online redo log group is written full, a log switch occurs, the online redo log Group 2 becomes the currently used log, when the online redo log Group 2 is full, the log switch, to write online redo log Group 1, so repeated.
If the database is in non-archive mode, the online log is discarded when it switches. In archive mode, when a log switch occurs, the log that is toggled is archived. For example, in the current use of online redo log 1, when 1 is full, a log switch occurs, start to write online redo log 2, the contents of online redo log 1 will be copied to another specified directory. This directory is called the Archive directory, and the copied files are called archive redo logs.
A database can be run with an archive for catastrophic recovery.
1. Differences between archived and non-archived log modes
Non-archive mode only makes cold backups, and only full backups can be made when recovering. Data cannot be recovered during the last full backup to system error.
Archive mode can do hot backup, and can do incremental backup, can do partial recovery.
Use the archive LOG LIST to view the archive mode or non-archive mode for the period mode state

Second view whether the Oracle database is an archive mode

1.select Name,log_mode from V$database;

NAME Log_mode

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

QUERY Noarchivelog

2. using the ARCHIVE LOG LIST command

Database log mode No Archive mode

Automatic Archival Disabled

Archive Destination/data/oracle/product/10.2.0/db_1//dbs/arch

Oldest online log sequence 739

Current log sequence 741

Archiving mode for three configuration databases

1. Set the Oracle database to archive mode
1) Sql>shutdown normal/immediate;
2) Sql>startup Mount;
3) Sql>alter database archivelog;
4) Sql>alter database open;
5) archive log list;

Note: Show parameter log_archive_dest see where the archive logs are stored.

2. Set the Oracle database to non-archive mode
1), Close the database
Shutdown immediate
2), and then back up the database to mount mode
Startup Mount
3), turn off Flash Flash database mode, if not closed, when you close the archive log when there will be a nasty ora-38774 error.
ALTER DATABASE Flashback off
4), then change the database to non-archive mode
ALTER DATABASE Noarchivelog;
5), all modified later, and then open the database
ALTER DATABASE open;
6), look at the size of the archive log space
SELECT * from V$recovery_file_dest;
Then look at the status of log logs
SELECT * from V$log;
And look at the flashback log usage.
SELECT * from V$flash_recovery_area_usage;

Oracle Archive mode and non-archive mode

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.