Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Tablespace growth

ABU JAMANFeb 18 2016 — edited Feb 18 2016

Hi all,

We are in 11gr2 2 nodes RAC in win2008r2. I want to get tablespace growth report in month wise for the last 6 months. I would appreciate if some one can help me out. The below query gives me one month only. I want month wise. Please help

SELECT TO_CHAR (sp.begin_interval_time,'DD-MM-YYYY') days

    , ts.tsname

    , max(round((tsu.tablespace_size* dt.block_size )/(1024*1024),2) ) cur_size_MB

    , max(round((tsu.tablespace_usedsize* dt.block_size )/(1024*1024),2)) usedsize_MB

    FROM DBA_HIST_TBSPC_SPACE_USAGE tsu

    , DBA_HIST_TABLESPACE_STAT ts

    , DBA_HIST_SNAPSHOT sp

    , DBA_TABLESPACES dt

    WHERE tsu.tablespace_id= ts.ts#

    AND tsu.snap_id = sp.snap_id

    AND ts.tsname = dt.tablespace_name

    AND ts.tsname NOT IN ('SYSAUX','SYSTEM')

    GROUP BY TO_CHAR (sp.begin_interval_time,'DD-MM-YYYY'), ts.tsname

    ORDER BY ts.tsname, days

/

This post has been answered by Anurag Tibrewal on Feb 18 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 17 2016
Added on Feb 18 2016
2 comments
891 views