好好利用sqlplus的报表功能(做了一个例子:查询系统等待
这样做出来的查询,看起来舒服多了!Set TrimSpoolOn
Set NewPage 0
Set Pages 57
Set Line 132
Set FeedBackOff
Set Verify Off
Set Term On
Ttitle Off
Btitle Off
ClearBreaks
Column Event For A40Heading "Wait Event"
Column Total_WaitsFor 999,999,990Head "Total Number| Of Waits "
Column Total_Timeouts For 999,999,990 Head "Total Number|Of TimeOuts"
Column Tot_Time For 999,999,990 Head "Total Time|Waited "
Column Avg_Time For 99,990.999 Head "Average Time|Per Wait "
Column InstanceNew_Value _InstanceNoPrint
Column Today New_Value _Date NoPrint
select Global_Name Instance, To_Char(SysDate,'FXDay DD, YYYY HH:MI') Today
from Global_Name;
TTitle On
TTitle Left 'Date Run: ' _Date Skip 1-
Center 'System Wide Wait Events' Skip 1 -
Center 'Instance Name: ' _Instance Skip 2
Select event, total_waits,
total_timeouts,(time_waited / 100) tot_time,
(average_wait / 100) Avg_time
fromv$system_event
order bytotal_waits desc
/
页:
[1]