Oracle Logbook

October 17, 2011

Rough idea regarding database usage

Filed under: Uncategorized — Helio Dias @ 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.

 

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: