How to query the usage rate of redo logfile
The use of Redo logfile cannot be queried by V $, but we can get through the underlying view.
First introduce the references and fields referenced by reference.
X $ KCCLE ---- [K] Ernel [C] Ache [c] ontrolfile management [l] ogfil [e] Record
This view records the use of logfile
among them,
Lesiz ---- Logfile Size (represented by logic block) Leseq ------ log sequence # lebsz ------ logfile logic block size
By the way, Redo logfile is in units of operating system blocks. So, Lebsz here is the size of the OS.
If we need to get the size of the OS block, you can query here:
SQL> SELECT MAX (LEBSZ) Lbsize from x $ kccle;
Lbsize ---------- 512
x $ kcccp ---- [k] Ernel [C] Ache [C] ontrolfile management [c] Heckpoint [P] Rogress
Progress
CPODR_SEQ ------ SEQ # cpodr_bno of the log file ------ Number of blocks in the log file
Get log file usage:
Select le.leseq current_log_sequence #,
100 * cp.cpodr_bno / le.Lesiz percentage_full
From x $ kcccp cp, x $ kccle le
WHERE le.leseq = cp.cpodr_seq;
reference:
Http://www.jlcomp.demon.co.uk/faq/redologuse.html
Saturday, July 24, 2004 0:13
If You Have Any Question, please mail to eye@itpub.net.