Hiển thị các bài đăng có nhãn graph. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn graph. Hiển thị tất cả bài đăng

Thứ Tư, 31 tháng 8, 2011

Trend Oracle Archive Graph : How much archive created y’day or last week


Often you want to show nice graphs/pictures to please your Colleagues. Here is an Excel graph I created to record Archive growth.
The following query shows a count and size of the redo log files by day:
– Daily Count and Size of Redo Log Space (Single Instance)
SELECT A.*,

Round(A.Count#*B.AVG#/1024/1024) Daily_Avg_Mb

FROM

(

SELECT

To_Char(First_Time,'YYYY-MM-DD') DAY,

Count(1) Count#,

Min(RECID) Min#,

Max(RECID) Max#

FROM

v$log_history

GROUP BY

To_Char(First_Time,'YYYY-MM-DD')

ORDER

BY 1 DESC

) A,

(

SELECT

Avg(BYTES) AVG#,

Count(1) Count#,

Max(BYTES) Max_Bytes,

Min(BYTES) Min_Bytes

FROM

v$log

) B

;

This v$log_history script comes from Ilya Petrenko
Output of the script : Delete columns Min(RECID) Min#,   Max(RECID) Max#












DAYLOG COUNTDAILY_AVG_MB
02/07/2010984480
01/07/20101265760
30/06/2010542469
29/06/2010281280
28/06/2010371691
27/06/201014640
26/06/201014640
25/06/201014640
24/06/201019869
23/06/201014640
Copy this table into Excel & click on Chart Wizard. Select X,Y co-ordinates and you will get a nice picture like this