Oracle's archive logs

Source: Internet
Author: User
Tags manual one table backup

Oracle can save an online log file to a number of different locations, and the process of converting an online log to an archive log is called archiving. The corresponding log is called an archive log.

One, archive log

is a copy of the online redo log group file

Contains redo records and a unique log sequence number

Archive one log file in a log group, and if one of the groups is corrupted, another available log will be archived

For log switching in archive mode, the next log can be overwritten or reused after the archive is completed

If the automatic archiving function is turned on, the background process ARCN the archive automatically when the log is switched, otherwise a manual archive is required

Archive log Use

Restore Database

Update the STANDBY database

Use Logminer to extract information about the history log

Two models of the log

1. Non-archival mode

Does not apply to the production database

When creating a database, the default log management mode is not archive mode

Log switch, when the checkpoint is generated, online redo logs can be reused

After the online log is overwritten, media recovery only supports the most recent full backup

Online backup table space is not supported, one table space corruption will cause the entire database to be unavailable, you need to remove the corrupted tablespace or restore from backup

Database consistency shutdown required for operating system-level database backups

All data files, control files (single), parameter files, password files, and online log files should be backed up (optional)

2. Archive mode

Ability to archive online log files, production databases strongly recommend archiving

When the log is switched, the next write log group must be archived before the log group can be used

Log sequence number information for the archive log is recorded in the control file

There must be enough disk space for the archive log

Oracle 9i need to set parameters log_archive_start=true to be able to archive automatically

Backup and Recovery

Supports hot backups, and when a non-system table space is corrupted, the database is still available and supports online recovery

This column more highlights: http://www.bianceng.cn/database/Oracle/

Use archived logs to enable online or offline Point-in-time restores (that is, you can revert to a specified point in time, a specified archive log, or a specified SCN)

Switching settings and manual archiving of two modes

1. Non-archive to archive mode

A. Consistency shutdown database (shutdown [immediate | transactional |normal])

B. Boot to mount phase (startup mount)

C. Switch to archive mode (ALTER DATABASE archivelog [manual])

d. Switch to open phase (ALTER DATABASE open)

E. Make a full backup of the data (fully backup)

--Demo archive to archive mode

sql> ARCHIVE LOG LIST--see if the database is in archive mode

Database log mode No Archive mode

Automatic Archival Disabled

Archive Destination Use_db_recovery_file_dest

Oldest online log sequence 14

Current log Sequence 16

Sql> SELECT Log_mode from V$database; --See if the database is in archive mode

Log_mode

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

Noarchivelog

Sql> SHUTDOWN IMMEDIATE; --Consistency Close the database

Database closed.

Database dismounted.

ORACLE instance shut down.

Sql> STARTUP MOUNT; --Boot to Mount state

ORACLE instance started.

Total System Global area 251658240 bytes

Fixed Size 1218796 bytes

Variable Size 75499284 bytes

Database buffers 171966464 bytes

Redo buffers 2973696 bytes

Database mounted.

sql> ALTER DATABASE Archivelog; --Switch to Automatic archive mode

Database altered.

sql> ALTER DATABASE OPEN; --Switch to open state

Database altered.

sql> ARCHIVE LOG LIST; --View the archive status of the database

Database Log Mode Archive mode--has been placed in the archive model

Automatic Archival Enabled-automatic archiving of logs

Archive Destination Use_db_recovery_file_dest

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.