How Oracle can redo log files online

Source: Internet
Author: User

I. Several types of log files in Oracle

Redo log files--> online redo logs

Archive log files--> archive log

Alert log files--> alarm logs

Trace files--> tracking log

User_dump_dest--> User tracking log

Backupground_dump_dest--> Process trace log

--View background process related directory

Sql> Show parameter Dump

NAME TYPE VALUE

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

Background_core_dump string Partial

Background_dump_dest String/u01/app/oracle/admin/orcl/bdump

Core_dump_dest String/u01/app/oracle/admin/orcl/cdump

Max_dump_file_size String Unlimited

Shadow_core_dump string Partial

User_dump_dest String/u01/app/oracle/admin/orcl/udump

Ii. Planning and management of online redo logs

1. Online Redo Log

Records all changes to the data (DML,DDL or administrator's structural changes to the data, etc.)

Provides recovery mechanisms (for accidental deletion or downtime using log files for data recovery)

Can be managed by group

2. Online Redo Log Group

An online redo log group consisting of one or more identical online log files

At least two log groups, one member per group (two members per group recommended, dispersed to different disks)

The LGWR background process writes the contents of the log to all members of a group at the same time

Trigger Condition of LGWR

When a transaction is committed (commit)

Redo Log Buffer One-third full

Redo log Buffer More than one trillion change record

Before Dbwn writes to the data file

3. Online Redo Log Members

Each online log file in the Redo log group is called a member

Each member within a group has the same log sequence number (log sequence numbers), and the members are of the same size

Each time the log is switched, the Oracle server assigns a new LSN number to the log filegroup that will be written to the log

The LSN number is used to uniquely differentiate each online log group and archive log

An online log in archive mode, which is also written to the archive log when the LSN number is archived

4. How the Log files work

Log files are written in sequential loops

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

When a set of online log groups is full, LGWR writes the log to the next group, which is written from the first group when the last set is full

The process of writing to the next group is called log switching

Checkpoint process occurs while switching

Checkpoint information is written to the control file at the same time

5. Planning of online log files

General principles

Spread and release, multiplexing

The disk on which the log resides should have high I/O

General log group size should meet the business requirements at least 15-20 minutes from the automatic switching interval

It is recommended to use the log filename at the end of RDO to avoid accidentally deleting the log file. such as Redo1.rdo,redo2.rdo

Planning examples

Redo log Group1 Redo log Group2 Redo log Group3

Member1 Member1 Member1-->physical Disk 1

Member2 Member2 Member2-->physical Disk 2

Member3 Member3 Member3-->physical Disk 3

6. Log switching and checkpoint switching

ALTER SYSTEM SWITCH LOGFILE; --Force Manual switch

ALTER SYSTEM CHECKPOINT;

Force setting checkpoint Interval

ALTER SYSTEM SET fast_start_mttr_target = n

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.