Portal
Language
 
Information
Article ID42
Created On5/6/2010
Modified5/6/2010
Share With Others
Oracle Monitornig

Oracle Monitoring

Use Database Query and Windows Service to monitor Oracle Services.

Database Query

Oracle.Connect

The duration to connect to a database

Oracle.Uptime

SELECT 24*(sysdate-startup_time) FROM sys.v_$instance

The number of hours that the server has been up

Oracle.ActiveUsers

SELECT COUNT(s.sid) FROM v$session s, v$process p
WHERE s.paddr = p.addr AND s.status = 'ACTIVE'

The number of Active Users on the Oracle server

Oracle.
BufferCacheHitRatio

SELECT ROUND((1-(phy.value / (cur.value + con.value)))*100,2) "Cache Hit Ratio"
FROM v$sysstat cur, v$sysstat con, v$sysstat phy
WHERE cur.name = 'db block gets'
AND con.name = 'consistent gets'
AND phy.name = 'physical reads'

The Buffer Cache Hit Ratio

Oracle.
DictionaryCacheHitRatio

select sum(gets-getmisses)*100/sum(gets)
from v$rowcache

The Dictionary Cache Hit Ratio

Oracle.SgaFreeMemory

select round(bytes/sgasize*100, 2)
from (select sum(bytes) sgasize from sys.v_$sgastat) s, sys.v_$sgastat f
where f.name = 'free memory'

The System Global Area (SGA) Free Memory

Oracle.SortsInMemory

SELECT ROUND((mem.value/(mem.value+dsk.value))*100,2)
FROM v$sysstat mem, v$sysstat dsk
WHERE mem.name='sorts (memory)'
AND dsk.name='sorts (disk)'

The measure of the proportion (%) of data sorts which occur within memory rather than on disk.

Oracle.SharedPoolFree

SELECT ROUND((sum(decode(name,'free memory',bytes,0))/sum(bytes))*100,2)
FROM v$sgastat

The percentage of the shared pool not currently in use.

Oracle.
SharedPoolReloads

SELECT ROUND(sum(reloads)/sum(pins)*100,2)
FROM v$librarycache
WHERE namespace in ('SQL AREA','TABLE/PROCEDURE','BODY','TRIGGER')

Shared pool reloads occur when Oracle reparses SQL or PL/SQL when it attempts to execute it.

Oracle.
LibraryCacheGetHitRatio

SELECT ROUND(sum(gethits)/sum(gets)*100,2)
FROM v$librarycache

The proportion of lock requests for an object which were satisfied by finding that object's handle already in memory.

Oracle.
LibraryCachePinHitRatio

SELECT ROUND(sum(pinhits)/sum(pins)*100,2)
FROM v$librarycache

The proportion of attempts to pin an object which were satisfied by finding all the pieces of that object already in memory.

Oracle.
RecursiveTotalCallRatio

SELECT ROUND((rcv.value/(rcv.value+usr.value))*100,2)
FROM v$sysstat rcv, v$sysstat usr
WHERE rcv.name='recursive calls'
AND usr.name='user calls'

The ratio of recursive calls to total calls.

Oracle.
RedoBufferActivity

SELECT ROUND((req.value/wrt.value)*100,2)
FROM v$sysstat req, v$sysstat wrt
WHERE req.name= 'redo log space requests'
AND wrt.name= 'redo writes'

Oracle.
CpuParseOverhead

SELECT ROUND((prs.value/(prs.value+exe.value))*100,2)
FROM v$sysstat prs, v$sysstat exe
WHERE prs.name like 'parse count (hard)'
AND exe.name= 'execute count'

The proportion (%) of database CPU time being spent in parsing SQL and PL/SQL code.

Windows Service

Windows Service

Service Name: OracleServiceXE

OracleServiceXE Server

Windows Service

Service Name: OracleXETNSListener

OracleXETNSListener

Windows Service

Service Name: OracleJobSchedulerXE

OracleJobSchedulerXE

Windows Service

Service Name: OracleMTSRecoveryService

OracleMTSRecoveryService

Reference

 

 

http://www.oracle-base.com/dba/DBACategories.php
http://www.hoopoes.com/cs/oracle_tune.shtml