Select Menu

Ads

Random Posts

Powered By Blogger
Powered By Blogger

Blog Archive

Search This Blog

Thirupal Boreddy. Powered by Blogger.

My Blog List

Followers

Lorem 1

Technology

Circle Gallery

Shooting

Racing

News

Lorem 4

select ts.name "Tablespace", today.full,last_week.full "Full_LAST_WEEK"
from
( select tsu.tablespace_id, round(tsu.tablespace_usedsize/tsu.tablespace_maxsize
*100,0) as full
from
wrh$_tablespace_space_usage tsu
where to_char(to_date(substr(tsu.rtime,1,13),'MM/DD/YYYYHH24'),'MM/DD/YYYYHH24')
= to_char(sysdate,'MM/DD/YYYYHH24')
) today,
( select tsu.tablespace_id, round(tsu.tablespace_usedsize/tsu.tablespace_maxsize
*100,0) as full
from
wrh$_tablespace_space_usage tsu
where to_char(to_date(substr(tsu.rtime,1,13),'MM/DD/YYYYHH24'),'MM/DD/YYYYHH24'
)= to_char(sysdate-7,'MM/DD/YYYYHH24')
) last_week,
v$tablespace ts
where
ts.ts# = today.tablespace_id
and ts.ts# = last_week.tablespace_id
order by 1;

QUERY FOR CPU USAGE

select  a.target_name as HOST, to_char(a.rollup_timestamp,' dd-Mon-yy::hh24:mi') as "DAY-TIME", sum(c.cpu_count) as ...