Oracle Logbook

October 17, 2011

Rough idea regarding database usage

Filed under: Uncategorized — heliodias @ 8:57 pm

Often we need answer these questions:

How  balanced are the usage among my RAC instances?

What is the database with higher resource demand? (not just redo writting).

Well the query below intend to answer those questions. It shows how much is the usage of database per second since the database started.

select
t1.inst_id,t1.STARTUP_TIME,trunc(value/((sysdate-STARTUP_TIME)*24*60*60)/1000000,2)
from
gv$instance t1,gv$sys_time_model t2 where
t1.INST_ID=t2.INST_ID and t2.stat_name=’DB time’
order by 2;

Futher improvements:

One may create a table , to record snapshots (AWR already do it, but you need the license), then you can check the delta between couple of minutes or hours.

 

Advertisements

Blog at WordPress.com.