Oracle Database Redo Management

Source: Internet
Author: User

One, what is redo LOG

The Redolog file is a very important document that records all changes to Oracle and is the most critical component of the database instance recovery mechanism.

Sys@ocm> select * from V$log;

group# thread# sequence# BYTES BLOCKSIZE members ARC STATUS first_change# first_time e# Next_time

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

1 1 52428800 1 YES INACTIVE 2701394 09-3-13 2711001 09-3-13

2 1 52428800 1 YES INACTIVE 2711001 09-3-13 2732482 10-3-13

3 1 Wuyi 52428800 1 NO current 2732482 10-3 -13 2.8147E+14

Sys@ocm> Col member for A50 sys@ocm> select * from V$logfile;

group# STATUS TYPE member Is_

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

3 Online/u01/app/oracle/oradata/ocm/redo03.log NO

2 Online/u01/app/oracle/oradata/ocm/redo02.log NO

1 Online/u01/app/oracle/oradata/ocm/redo01.log NO

Second, the role of REDO log

1. Record Oracle Database changes

2, can avoid data submission and write directly to the data file

3. Instance recovery and media recovery

Three, REDO log block

1, the size of the block

(1) Dbfsize Redo01.log

(2) SELECT DISTINCT block_size from V$archived_log;

(3) SELECT MAX (Lebsz) from X$kccle;

(4) The contents of the header of the log file

ALTER session SET EVENTS ' immediate trace name REDOHDR level 10 ';

2, the content of redo

(1) changing vectors (change vector)

(2) Redo records (Redo record)

(3) An inserted log of the resulting

CREATE TABLE T5 (ID int,name varchar2 (100));

Select Max (KTUXESCNW * Power (2,32) +KTUXESCNB) from X$ktuxe;--[k]ernel [t]ransaction] U]ndo transa[x]tion

INSERT into T5 values (1, ' aaaaaa ');

Commit

Select Max (KTUXESCNW * Power (2,32) +KTUXESCNB) from X$ktuxe;

alter system dump logfile '/u01/app/oracle/oradata/ocp/redo02.log ' scn min 1694394 scn max 1693357;

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.