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;