You are on page 1of 13

1.

1_Archive_Area_Use_(%) :
select PERCENT_SPACE_USED from V$FLASH_RECOVERY_AREA_USAGE where FILE_TY
PE='ARCHIVED LOG';
________________________________________________________________________________
_______________________
3.1_Average_File_Read_Time_(centi-seconds) :
select METRIC_NAME,max(VALUE) from v$metric where METRIC_NAME like '%Ave
rage File Read Time%' and INTSIZE_CSEC=(select max(INTSIZE_CSEC) from v$metric)
group by METRIC_NAME;
________________________________________________________________________________
________________________
3.2_Average_File_Write_Time_(centi-seconds):
select METRIC_NAME,max(VALUE) from v$metric where METRIC_NAME like '%Ave
rage File Write Time%' and INTSIZE_CSEC=(select max(INTSIZE_CSEC) from v$metric)
group by METRIC_NAME;
________________________________________________________________________________
________________________
4.1_Broken_Job_Count :
SELECT COUNT(*) FROM dba_jobs WHERE broken < > 'N';
________________________________________________________________________________
________________________
4.2_FAILED_JOB_COUNT :
SELECT COUNT(*) FROM dba_jobs WHERE broken < > 'N';
________________________________________________________________________________
________________________
5.4_Session_Limit_Usage_(%) :
SELECT resource_name name, 100*DECODE(initial_allocation, ' UNLIMITED',
0, current_utilization) != '0' AND resource_name = 'sessions'
________________________________________________________________________________
________________________
5.5_User_Limit_Usage_(%) :
SELECT 'user' name, 100*DECODE(session_max, 0,0,sessions_current/session
_max) usage FROM v$license
________________________________________________________________________________
________________________
8.1_Service_CPU_Time_(per user call)_(Microseconds) :
select METRIC_NAME, VALUE from SYS.V_$SYSMETRIC where METRIC_NAME IN ('D
atabase CPU Time Ratio', 'Database Wait Time Ratio') AND INTSIZE_CSEC = (select
max(INTSIZE_CSEC) from SYS.V_$SYSMETRIC)
________________________________________________________________________________
________________________
16.4_Data_Dictionary_Hit_(%)
select sum(getmisses) from v$rowcache
se
lect sum(gets) from v$rowcache
________________________________________________________________________________

________________________
16.6_Library_Cache_Hit_(%)
select sum(pinhits) from v$librarycache
select sum(pins) from v$librarycache
________________________________________________________________________________
________________________
16.7_Library_Cache_Miss_(%)
select pins, pinhits from v$librarycache
________________________________________________________________________________
________________________
16.13_Redo_Log_Allocation_Hit_(%) :
1) select value from v$sysstat where name ='redo entries'
2) select value from v$sysstat where name='redo log space requests'
________________________________________________________________________________
________________________
16.14_Response_Time_(per_transaction) :
select METRIC_NAME, VALUE from SYS.V_$SYSMETRIC where METRIC_NAME IN ('D
atabase CPU Time Ratio', 'Database Wait Time Ratio') AND
INTSIZE_CSEC = (
select max(INTSIZE_CSEC) from SYS.V_$SYSMETRIC)
________________________________________________________________________________
________________________
16.15_Row_Cache_Miss_Ratio_(%) :
SELECT (P1.value + P2.value - P3.value) / (P1.value + P2.value) FROM v$s
ysstat P1, v$sysstat P2, v$sysstat P3 WHERE P1.name = 'db block
gets' AND P2.name = 'consistent gets' AND P3.name = 'physical reads'
________________________________________________________________________________
________________________
16.16_Sorts_in_Memory_(%) :
1) select value from v$sysstat where name='sorts(memory); /* (DeltaMemor
ySorts) */
2) select value from v$sysstat where name='sorts(disk); /*(DeltaDiskSor
ts) */
________________________________________________________________________________
________________________
17.1_Failed_Login_Count :
select Owner, action, timestamp, Logoff_time from dba_audit_trail where
owner 'username'
________________________________________________________________________________
________________________
34.1_Java_Pool_Free_(%) :
select sum(decode(name,'free memory',bytes)) from v$sgastat
where pool = 'java pool'
Select sum(bytes) from v$sgastat where pool = 'java pool'
________________________________________________________________________________
________________________

34.2_Large_Pool_Free_(%) :
select sum(decode(name,'free memory',bytes)) from v$sgastat
where pool = 'large pool'
Select sum(bytes) from v$sgastat where pool = 'large pool'
________________________________________________________________________________
________________________
34.3_Shared_Pool_Free_(%) :
select sum(decode(name,'free memory',bytes)) from v$sgastat
where pool ='shared pool' (FREE)
select sum(bytes) from v$sgastat
where pool = 'shared pool' (TOTAL)
________________________________________________________________________________
________________________
40.6_Streams_Apply_(%)_Spilled Messages :
1) select inst_id,queue_id,queue_name,spill_msgs,queue_state from gv$buf
fered_queues
2) Select * from gv$buffered_subscribers;
________________________________________________________________________________
________________________
41.2_Streams_Process_Status :
Select * from DBA_CAPTURE;
Select * from dba_propagation;
Select * from dba_apply;
________________________________________________________________________________
________________________
45.1_Tablespace_Free_Space_(MB)_(dictionary managed) :
select t.tablespace, t.totalspace as " Totalspace(MB)",
round((t.totalspace-fs.freespace),2) as "Used Space(MB)",
fs.freespace as "Freespace(MB)",
round(((t.totalspace-fs.freespace)/t.totalspace)*100,2) as "% Used",
round((fs.freespace/t.totalspace)*100,2) as "% Free"
from (select round(sum(d.bytes)/(1024*1024)) as totalspace, d.tablespace
_name tablespace
from dba_data_files d group by d.tablespace_name) t,
(select round(sum(f.bytes)/(1024*1024)) as freespace, f.tablespace_name
tablespace
from dba_free_space f group by f.tablespace_name) fs
where t.tablespace=fs.tablespace order by t.tablespace;
________________________________________________________________________________
________________________
47.1_Average_Active_Sessions :
select METRIC_NAME,VALUE from v$sysmetric
where METRIC_NAME in ('Average Active Sessions')
and INTSIZE_CSEC=(select max(INTSIZE_CSEC) from v$sysmetric);
________________________________________________________________________________
________________________

47.2_Average_Synchronous_Single_Block_Read_Latency_(ms) :
select METRIC_NAME,VALUE from v$sysmetric
where METRIC_NAME in ('Average Synchronous Single-Block Read Latency')
and INTSIZE_CSEC=(select max(INTSIZE_CSEC)
from v$sysmetric);
________________________________________________________________________________
________________________
47.3_BG_Checkpoints_(per_second) :
select METRIC_NAME,VALUE from v$sysmetric
where METRIC_NAME in ('Background Checkpoints Per Sec')
And INTSIZE_CSEC=(select max(INTSIZE_CSEC)
from v$sysmetric);
________________________________________________________________________________
________________________
47.4_Branch_Node_Splits_(per_second) :
select METRIC_NAME,VALUE from v$sysmetric
where METRIC_NAME in ('Branch Node Splits Per Sec')
and INTSIZE_CSEC=(select max(INTSIZE_CSEC)
from v$sysmetric);
________________________________________________________________________________
________________________
47.5_Branch_Node_Splits_(per_transaction) :
select METRIC_NAME,VALUE from v$sysmetric
where METRIC_NAME in ('Branch Node Splits Per Txn')
and INTSIZE_CSEC=(select max(INTSIZE_CSEC)
from v$sysmetric);
________________________________________________________________________________
________________________
47.7_Cumulative_Logons_(per_second) :
select NAME, VALUEfrom V$sysstat
where name='logons cumulative';
________________________________________________________________________________
________________________
47.8_DBWR_Checkpoints_(per_second) :
select value from v$sysstat
where name='DBWR checkpoints'
________________________________________________________________________________
________________________
47.12_Database_Time_(centiseconds_per_second) :
select stat_name, value
from V$sys_time_model
where stat_name='DB time';
________________________________________________________________________________
________________________
47.15_Enqueue_Requests_(per_second) :

Select ety Enqueue , reqs "Requests", sreq "Successful Gets", freq "Failed
Gets", waits "Waits", wttm "Wait Time (s)", awttm "Avg Wait
Time(ms)
" from ( select /*+ ordered */ e.eq_type || '-' || to_char(nvl(l.name,' ')) || d
ecode( upper(e.req_reason) , 'CONTENTION', null ,
'-', null , ' ('
||e.req_reason||')') ety , e.total_req# - nvl(b.total_req#,0) reqs , e.succ_req#
- nvl(b.succ_req#,0) sreq , e.failed_req#
- nvl(b.failed_req#,0) f
req , e.total_wait# - nvl(b.total_wait#,0) waits , (e.cum_wait_time - nvl(b.cum_
wait_time,0))/1000 wttm , decode(
(e.total_wait# - nvl(b.total_wai
t#,0)) , 0, to_number(NULL) , ( (e.cum_wait_time - nvl(b.cum_wait_time,0)) / (e.
total_wait# - nvl
(b.total_wait#,0)) ) ) awttm from dba_hi
st_enqueue_stat e , dba_hist_enqueue_stat b , v$lock_type l where b.snap_id(+) =
&pBgnSnap and
e.snap_id = &pEndSnap and b.dbid(+) = &pDbId
________________________________________________________________________________
________________________
47.22_Executes_Performed_without_Par :
1.select value from v$sysstat
where name='parse count (total) /* between sample end and start */
2.select value from v$sysstat
where name='execute count /* between sample end and start */
________________________________________________________________________________
________________________
47.23_Full_Index_Scans_(per_second) :
select

to_char(sn.begin_interval_time,'yy-mm-dd hh24') c1, count(1)

c2
From

dba_hist_sql_plan p,

dba_hist_sqlstat s, dba_hist_snapshot s

n
Where p.object_owner <> 'SYS' And p.operation like '%TABLE ACCESS%'
And p.options = 'FULL' And p.sql_id = s.sql_id
And s.snap_id = sn.snap_id
group by to_char(sn.begin_interval_time,'yy-mm-dd hh24')
order by 1
________________________________________________________________________________
________________________
47.24_Full Index_Scans_(per_transaction) :
select to_char(sn.begin_interval_time,'yy-mm-dd hh24') c1,count(1) c2
from
dba_hist_sql_plan p,
dba_hist_sqlstat s, dba_hist_snapshot s
n
Where p.object_owner <> 'SYS' And p.operation like '%TABLE ACCESS%'
And p.options = 'FULL' And p.sql_id = s.sql_id And s.snap_id = sn.sna
p_id
group by to_char(sn.begin_interval_time,'yy-mm-dd hh24')
order by 1
________________________________________________________________________________
________________________
47.25_Hard_Parses_(per_second) :
select value from v$sysstat
where name='parse count (hard) /*between end and start of sample period
*/
Seconds: number of seconds in sample period
________________________________________________________________________________
________________________

47.26_Hard_Parses_(per_transaction) :
select value from v$sysstat
where name='parse count (hard) /*between end and start of sample period.
Transactions: number of transactions in sample period
________________________________________________________________________________
________________________
47.27_I/O_Megabytes_(per_second) :
/*CHECK AND TRY TO DECREASE VALUE */
select value, Begin_time, end_time, metric_name,metric_unit
from v$sysmetric where metric_name like '%Megabytes%';
________________________________________________________________________________
________________________
47.31_Network_Bytes :
select s.value from v$sysstat s, v$statname n
where n.name='bytes sent via SQL*Net to client' and n.statistic#=s.stati
stic#; select s.value
from v$sysstat s, v$statname n
where n.name='bytes received via SQL*Net from client' and n.statistic#=s
.statistic#;
________________________________________________________________________________
________________________
47.32_Number_of_Transactions :
select sysdate, name, value from v$sysstat
where name = 'user rollbacks';|select sysdate, name, value
from v$sysstat where name = 'user commits';
________________________________________________________________________________
________________________
47.33_Open_Cursors_(per_second) :
select value, metric_unit,metric_name
from v$metric where metric_name = 'Open Cursors Per Sec';
________________________________________________________________________________
________________________
47.34_Open_Cursors_(per_transactions) :
select value, metric_unit,metric_name
from v$metric where metric_name = 'Open Cursors Per txn';
________________________________________________________________________________
________________________
47.35_Parse_Failure_Count_(per_second) :
select value, metric_unit,metric_name from v$metric
where metric_name = 'Parse Failure Count Per Sec';
________________________________________________________________________________
________________________
47.36_Parse_Failure_Count_(per_transaction) :

select value, metric_unit,metric_name from v$metric


where metric_name = 'Parse Failure Count Per txn';
________________________________________________________________________________
________________________
47.38_Physical_reads_(per_second) :
select value, metric_unit,metric_name from v$metric
where metric_name = 'Physical reads Per Sec'
________________________________________________________________________________
________________________
47.39_Physical_reads_(per_transaction) :
select value, metric_unit,metric_name from v$metric
where metric_name = 'Physical Reads Per txn';
________________________________________________________________________________
________________________
47.40_Physical_Reads_Direct_(per_second) :
select value, metric_unit,metric_name from v$metric
where metric_name = 'Physical Reads Direct Per Sec'
________________________________________________________________________________
________________________
47.41_Physical_Reads_direct_(per_transaction) :
select value, metric_unit,metric_name from v$metric
where metric_name = 'Physical Reads Direct Per txn';
________________________________________________________________________________
________________________
47.42_Physical_read_direct_Lobs_(per_second) :
select value, metric_unit,metric_name from v$metric
where metric_name = 'Physical Reads Direct Lobs Per Sec';
________________________________________________________________________________
________________________
47.43_Physical_read_direct_Lobs_(per_transaction) :
select value, metric_unit,metric_name from v$metric
where metric_name = 'Physical Reads Direct Lobs Per txn'
________________________________________________________________________________
________________________
47.44_Physical_write_(per_second) :
select value, metric_unit,metric_name from v$metric
where metric_name = 'Physical Writes Per Sec';
________________________________________________________________________________
________________________
47.45_Physical_writes_(per_transaction) :
select value, metric_unit,metric_name from v$metric
where metric_name = 'Physical Writes Per txn';
________________________________________________________________________________
________________________

47.46_Physical_write_direct_(per-second) :
select value, metric_unit,metric_name from v$metric
where metric_name = 'Physical Writes Direct Per sec';
________________________________________________________________________________
________________________
47.47_Physical_writes_direct_(per_transaction) :
select value, metric_unit,metric_name from v$metric
where metric_name = 'Physical Writes Direct Per Txn';
________________________________________________________________________________
________________________
47.48_Physical_writes_direct_LOB_(per_second) :
select value, metric_unit,metric_name from v$metric
where metric_name = 'Physical Writes Direct Lobs Per Txn';
________________________________________________________________________________
________________________
47.49_Physical_writes_direct_LOB_(per_transaction) :
select value, metric_unit,metric_name from v$metric
where metric_name = 'Physical Writes Direct Lobs Per Txn'
________________________________________________________________________________
________________________
47.50_Recursive_calls_(per_second) :
select value, metric_unit,metric_name from v$metric
where metric_name = 'Recursive Calls Per Sec';
________________________________________________________________________________
________________________
47.51_Recursive_calls(per_transaction) :
select value, metric_unit,metric_name from v$metric
where metric_name = 'Recursive Calls Per txn';
________________________________________________________________________________
________________________
47.52_Redo_Writes :
select value from v$sysstat where name='redo Writes'
________________________________________________________________________________
________________________
47.53_Redo_Writes_(per_transaction) :
1) select s.value from v$sysstat s, v$statname n where n.name='redo writ
es' and n.statistic#=s.statistic# (Delta Redo Writes)
2) select s.value from v$sysstat s, v$statname n where n.name='user comm
its' and n.statistic#=s.statistic# (Delta Commits)
3) select s.value from v$sysstat s, v$statname n where n.name='user comm
its' and n.statistic#=s.statistic# (Delta Rollbacks)
________________________________________________________________________________
________________________
47.54_Rows_Processed_(per_sort) :

1) select value from v$sysstat where name='sorts (rows)'

(Delta sort r

ows)
2) select value from v$sysstat where name='sorts (memory)' (Delta Memory
Sorts)
3) select value from v$sysstat where name='sorts (disk)' (Delta Disk S
ort)
________________________________________________________________________________
________________________
47.55_Scans_on_Long_Tables_(per_second) :
select value from v$sysstat where name='table scans (long tables)' (Delt
a Scans)
________________________________________________________________________________
________________________
47.56_Scans_on_Long_Tables_(per_transaction) :
select value from v$sysstat where name='table scans(long tables)' (Delt
a Scans)
________________________________________________________________________________
________________________
47.57_Session-Logical_Reads_(per_second) :
select value from v$sysstat where name='session logical reads'
________________________________________________________________________________
________________________
47.58_Session_Logical_Reads_(per_transaction) :
select value from v$sysstat where name='session logical reads'
________________________________________________________________________________
________________________
47.59_Soft_Parse_(%) :
1) select value from v$sysstat where name='parse count (total)' (DeltaPa
rseCountTotal)
2) select value from v$sysstat where name='parse count (hard)' (DeltaPar
seCountHard)
________________________________________________________________________________
________________________
47.60_Sorts_to_Disk_(per_second) :
select value from v$sysstat where name='sorts(disk)'

(DeltaDiskSorts)

________________________________________________________________________________
________________________
47.61_Sorts_to_Disk_(per_transaction) :
select value from v$sysstat where name='sorts(disk)'

(DeltaDiskSorts)

________________________________________________________________________________
________________________
47.62_Total_Index_Scans_(per_second) :
sho parameter optimizer_index_cost_adj;

________________________________________________________________________________
________________________
47.63_Total_Index_Scans_(per_Transaction) :
Select to_char(sn.begin_interval_time,'yy-mm-dd hh24')c1, count(1) c2
from
dba_hist_sql_plan p,
dba_hist_sqlstat s,
dba_hist_snapsho
t sn
where
p.object_owner <> '&Object_OWner' and
p.operation like '%TAB
LE ACCESS%'
and
p.options = 'Scan_type' and
p.sql_id = s.sql_id and
s.snap_
id = sn.snap_id
group by to_char(sn.begin_interval_time,'yy-mm-dd hh24') order by 1
________________________________________________________________________________
________________________
47.64_Total_Parses_(per_second) :
select value from v$sysstat where name='parse count (total)';
________________________________________________________________________________
________________________
47.65_Total_Parses_(per_Transaction) :
select value from v$sysstat where name = 'parse count (total)';
________________________________________________________________________________
________________________
47.66_Total_Table_Scans_(per_second) :
select value from v$sysstat where name='table scans (long tables)';
select value from v$sysstat where name='table scans (short tables)';
________________________________________________________________________________
________________________
47.67_Total_Table_Scans_(per_Transaction) :
select value from v$sysstat where name='table scans (long tables)';
select value from v$sysstat where name='table scans (short tables)';
________________________________________________________________________________
________________________
47.68_User_Call_(per_second) :
select value from v$sysstat where name='user calls';
________________________________________________________________________________
_________________________
47.69_User_Call_(per_Transaction) :
select value from v$sysstat where name='user calls';
________________________________________________________________________________
_________________________
47.70_1_User_commits_(Per_Second) :
select value from v$sysstat where name='user commits';
________________________________________________________________________________
_________________________

47.71_User_commits_(Per_Transaction) :
select value from v$sysstat where name='user commits';
________________________________________________________________________________
_________________________
47.74_user rollbacks_(Per_Second) :
select value from v$sysstat where name='user rollbacks';
________________________________________________________________________________
_________________________
47.75_user rollbacks_(Per_Transaction) :
select value from v$sysstat where name='user rollbacks';
________________________________________________________________________________
_________________________
49.1_Blocking_session_count :
SELECT blocking_sid, num_blocked
FROM ( SELECT blocking_sid, SUM(num_blocked) num_blocked
FROM ( SELECT l.id1, l.id2, MAX(DECODE(l.block, 1, i.instance_name||'-'|
|l.sid, 2, i.instance_name||'-'||l.sid, 0 ))
blocking_sid, SUM(DECODE(l.request, 0, 0, 1 )) num_blocked FROM gv$lock
l, gv$instance i
WHERE ( l.block!= 0 OR l.request > 0 ) AND l.inst_id = i.inst_id GROUP B
Y l.id1, l.id2)
GROUP BY blocking_sid ORDER BY num_blocked DESC) WHERE num_blocked != 0;
________________________________________________________________________________
_________________________
49.2_Blocking_Session_DB_Time :
select seconds_in_wait from v$session where blocking_session is not NUL
L order by blocking_session;
________________________________________________________________________________
_________________________
51.1_Average_Users_Waiting_Count :
select METRIC_NAME,VALUE from v$metric where METRIC_NAME in ('Average Us
ers Waiting Counts')
and INTSIZE_CSEC=(select max(INTSIZE_CSEC) from v$metric);

Delete this:
47.5_Branch_Node_Splits_(per_transaction) :
________________________________________________________________________
select
where
and
from
INTSIZE_CSEC=(select
v$sysmetric);
METRIC_NAME
METRIC_NAME,VALUE
in ('Branch
from Node
max(INTSIZE_CSEC)
v$sysmetric
Splits Per Txn')
47.7_Cumulative_Logons_(per_second)
________________________________________________________________________
selectname='logons
where
NAME, VALUEfrom
cumulative';
V$sysstat
:
47.8_DBWR_Checkpoints_(per_second)
________________________________________________________________________
selectname='DBWR
where
value fromcheckpoints'
v$sysstat:
47.12_Database_Time_(centiseconds_per_second)
________________________________________________________________________
selectV$sys_time_model
from
where
stat_name='DB
stat_name, value
time';
:
47.15_Enqueue_Requests_(per_second)
Select ety Enqueue , reqs "Requests",
:
sreq "Successful Gets", f
'-' || to_char(nvl(l.name,' ')) || decode( upper(e.req_reason) , 'CONTEN

nvl(b.succ_req#,0) sreq , e.failed_req#


- nvl(b.failed_req#
(e.total_wait# - nvl(b.total_wait#,0)) , 0, to_number(NULL) , (
dba_hist_enqueue_stat e , dba_hist_enqueue_stat b , v$lock_type l where
________________________________________________________________________
47.22_Executes_Performed_without_Par
1.select
where name='parse
value from count
v$sysstat
(total)
:
/* between sample end and sta
________________________________________________________________________
2.select
where name='execute
value from v$sysstat
count /* between sample end and start */
47.23_Full_Index_Scans_(per_second)
select to_char(sn.begin_interval_time,'yy-mm-dd
:
hh24') c1, c
From
dba_hist_sql_plan p,
dba_hist_sqlstat s, dba_hist_sn
Where p.object_owner <> 'SYS' And p.operation like '%TABLE ACCES
________________________________________________________________________
And p.options
group
order
s.snap_id
by 1to_char(sn.begin_interval_time,'yy-mm-dd
= 'FULL'
sn.snap_id
And p.sql_id = s.sql_id hh24')
47.24_Full
select
Index_Scans_(per_transaction)
to_char(sn.begin_interval_time,'yy-mm-dd
:
hh24') c1,coun
from
dba_hist_sql_plan p,
dba_hist_sqlstat s, dba_hist_sn
Where p.object_owner <> 'SYS' And p.operation like '%TABLE ACCES
And p.options = 'FULL' And p.sql_id = s.sql_id And s.snap_id
________________________________________________________________________
group by 1to_char(sn.begin_interval_time,'yy-mm-dd hh24')
order
47.25_Hard_Parses_(per_second)
selectname='parse
where
value from count
v$sysstat
:(hard) /*between end and start of sample
________________________________________________________________________
Seconds: number of seconds in sample period
47.26_Hard_Parses_(per_transaction)
selectname='parse
where
value from count
v$sysstat
(hard)
: /*between end and start of sample
________________________________________________________________________
Transactions: number of transactions in sample period
________________________________________________________________________
47.27_I/O_Megabytes_(per_second)
/*CHECK
select
from
v$sysmetric
value,
AND TRYBegin_time,
TOwhere
DECREASE
metric_name
:end_time,
VALUE */like
metric_name,metric_unit
'%Megabytes%';
47.31_Network_Bytes
selectn.name='bytes
where
s.value
: from sent
v$sysstat
via SQL*Net
s, v$statname
to client'
n and n.statistic#
where
from v$sysstat
n.name='bytes
s, v$statname
received via
n SQL*Net from client' and n.stat
________________________________________________________________________
47.32_Number_of_Transactions
________________________________________________________________________
selectv$sysstat
where
from
name
sysdate,
= 'user
where
name,
rollbacks';|select
name
:value= 'user
from v$sysstat
commits';
sysdate, name, value
47.33_Open_Cursors_(per_second)
________________________________________________________________________
selectv$metric
from
value, where
metric_unit,metric_name
metric_name
:
= 'Open Cursors Per Sec';
47.34_Open_Cursors_(per_transactions)
________________________________________________________________________
selectv$metric
from
value, where
metric_unit,metric_name
metric_name: = 'Open Cursors Per txn';
47.35_Parse_Failure_Count_(per_second)
________________________________________________________________________
selectmetric_name
where
value, metric_unit,metric_name
= 'Parse Failure
: Count
fromPerv$metric
Sec';
47.36_Parse_Failure_Count_(per_transaction)
________________________________________________________________________
selectmetric_name
where
value, metric_unit,metric_name
= 'Parse Failure Count
: fromPerv$metric
txn';
47.38_Physical_reads_(per_second)
________________________________________________________________________
selectmetric_name
where
value, metric_unit,metric_name
= 'Physical
: reads Perfrom
Sec'v$metric
47.39_Physical_reads_(per_transaction)
________________________________________________________________________
selectmetric_name
where
value, metric_unit,metric_name
= 'Physical Reads
:
Perfrom
txn';
v$metric
47.40_Physical_Reads_Direct_(per_second)
________________________________________________________________________
selectmetric_name
where
value, metric_unit,metric_name
= 'Physical Reads
: Direct
from Per
v$metric
Sec'
47.41_Physical_Reads_direct_(per_transaction)
________________________________________________________________________
selectmetric_name
where
value, metric_unit,metric_name
= 'Physical Reads Direct
from
:
v$metric
Per
txn';
47.42_Physical_read_direct_Lobs_(per_second)
________________________________________________________________________
selectmetric_name
where
value, metric_unit,metric_name
= 'Physical Reads Direct
:from Lobs
v$metric
Per Sec';
47.43_Physical_read_direct_Lobs_(per_transaction)
________________________________________________________________________
selectmetric_name
where
value, metric_unit,metric_name
= 'Physical Reads Direct
from:Lobs
v$metric
Per txn'
47.44_Physical_write_(per_second)
________________________________________________________________________
selectmetric_name
where
value, metric_unit,metric_name
= 'Physical
: Writes Per
fromSec';
v$metric
47.45_Physical_writes_(per_transaction)
________________________________________________________________________
selectmetric_name
where
value, metric_unit,metric_name
= 'Physical Writes
:
Per
fromtxn';
v$metric
47.46_Physical_write_direct_(per-second)
________________________________________________________________________
selectmetric_name
where
value, metric_unit,metric_name
= 'Physical Writes
: Direct
from v$metric
Per sec';
47.47_Physical_writes_direct_(per_transaction)
________________________________________________________________________
selectmetric_name
where
value, metric_unit,metric_name
= 'Physical Writes Direct
from
: v$metric
Per Txn';
47.48_Physical_writes_direct_LOB_(per_second)
________________________________________________________________________
selectmetric_name
where
value, metric_unit,metric_name
= 'Physical Writes Direct
from
:
v$metric
Lobs Per Txn';
47.49_Physical_writes_direct_LOB_(per_transaction)
________________________________________________________________________
selectmetric_name
where
value, metric_unit,metric_name
= 'Physical Writes Direct
from v$metric
:Lobs Per Txn'
47.50_Recursive_calls_(per_second)
________________________________________________________________________
selectmetric_name
where
value, metric_unit,metric_name
= 'Recursive
: Calls Per
fromSec';
v$metric
47.51_Recursive_calls(per_transaction)
________________________________________________________________________
selectmetric_name
where
value, metric_unit,metric_name
= 'Recursive Calls
:
Per
fromtxn';
v$metric
47.52_Redo_Writes
________________________________________________________________________
select value
: from v$sysstat where name='redo Writes'
47.53_Redo_Writes_(per_transaction)
1) select s.value from v$sysstat
:
s, v$statname n where n.name='r
2) select s.value from v$sysstat s, v$statname n where n.name='u
3) select s.value from v$sysstat s, v$statname n where n.name='u
________________________________________________________________________
47.54_Rows_Processed_(per_sort)
1) select value from v$sysstat
:
where name='sorts (rows)' (Delt
2) select value from v$sysstat where name='sorts (memory)' (Delt
3) select value from v$sysstat where name='sorts (disk)' (Delt
________________________________________________________________________
47.55_Scans_on_Long_Tables_(per_second)
select value from v$sysstat where: name='table scans (long tables
________________________________________________________________________
47.56_Scans_on_Long_Tables_(per_transaction)
select value from v$sysstat where name='table
:
scans(long tables)
________________________________________________________________________
47.57_Session-Logical_Reads_(per_second)
select value from v$sysstat where:name='session logical reads'
________________________________________________________________________
47.58_Session_Logical_Reads_(per_transaction)
select value from v$sysstat where name='session
:
logical reads'
________________________________________________________________________
47.59_Soft_Parse_(%)
1) select value
: from v$sysstat where name='parse count (total)'

2) select value from v$sysstat where name='parse count (hard)' (


________________________________________________________________________
47.60_Sorts_to_Disk_(per_second)
select value from v$sysstat
: where name='sorts(disk)' (DeltaDis
________________________________________________________________________
47.61_Sorts_to_Disk_(per_transaction)
select value from v$sysstat where
: name='sorts(disk)' (DeltaDis
________________________________________________________________________
47.62_Total_Index_Scans_(per_second)
________________________________________________________________________
sho parameter optimizer_index_cost_adj;
:
47.63_Total_Index_Scans_(per_Transaction)
Select to_char(sn.begin_interval_time,'yy-mm-dd
:
hh24')c1, count
from
dba_hist_sql_plan p,
dba_hist_sqlstat s,
dba_hist
where
p.object_owner <> '&Object_OWner' and
p.operation li
and
p.options = 'Scan_type' and
p.sql_id = s.sql_id and
group by to_char(sn.begin_interval_time,'yy-mm-dd hh24') order b
________________________________________________________________________
47.64_Total_Parses_(per_second)
________________________________________________________________________
select value from v$sysstat
: where name='parse count (total)';
47.65_Total_Parses_(per_Transaction)
________________________________________________________________________
select value from v$sysstat where
:
name = 'parse count (total)';
47.66_Total_Table_Scans_(per_second)
select value from v$sysstat where
:
name='table scans (long tables
select value from v$sysstat where name='table scans (short table
________________________________________________________________________
47.67_Total_Table_Scans_(per_Transaction)
select value from v$sysstat where name='table
:
scans (long tables
select value from v$sysstat where name='table scans (short table
________________________________________________________________________
47.68_User_Call_(per_second)
________________________________________________________________________
select value from v$sysstat
:
where name='user calls';
47.69_User_Call_(per_Transaction)
________________________________________________________________________
select value from v$sysstat: where name='user calls';
47.70_1_User_commits_(Per_Second)
________________________________________________________________________
select value from v$sysstat: where name='user commits';
47.71_User_commits_(Per_Transaction)
________________________________________________________________________
select value from v$sysstat where
:
name='user commits';
47.74_user
________________________________________________________________________
select
rollbacks_(Per_Second)
value from v$sysstat: where name='user rollbacks';
47.75_user
________________________________________________________________________
select
rollbacks_(Per_Transaction)
value from v$sysstat where
: name='user rollbacks';
49.1_Blocking_session_count
SELECT( SELECT
FROM
blocking_sid,
blocking_sid,
l.id1,
:l.id2,
num_blocked
SUM(num_blocked) num_blocked
MAX(DECODE(l.block,
1, i.instance_na
blocking_sid, SUM(DECODE(l.request, 0, 0, 1 )) num_blocked FROM
WHERE ( l.block!= 0 OR l.request > 0 ) AND l.inst_id = i.inst_id
GROUP BY blocking_sid ORDER BY num_blocked DESC) WHERE num_block
________________________________________________________________________
49.2_Blocking_Session_DB_Time
select seconds_in_wait: from v$session where blocking_session is
________________________________________________________________________
select METRIC_NAME,VALUE
_Count from
:
v$metric where METRIC_NAME in ('Av
51.1_Average_Users_Waiting
and INTSIZE_CSEC=(select max(INTSIZE_CSEC) from v$metric);

You might also like