Random Posts
Blog Archive
ORACLE DBA
Search This Blog
Blog Archive
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;
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;
Tabelspace_Growth
Subscribe to:
Comments (Atom)
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 ...

