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!

Querying monthly database size from my history tablespace size table.

948574Jul 10 2012 — edited Jul 10 2012
Hello fellow DBAs,

Could you please assist me on how I can create a report against my history tablespace size table? I would like to query total size on a monthly basis? My table and example data is as follows:



SQL> ACE_TBS_INFO;
Name Null? Type
----------------------------------------- -------- ----------------------------
RUN_ID NUMBER
RUN_DT DATE
TBS_NAME VARCHAR2(30)
TBS_MB NUMBER
TBS_PCT_FULL NUMBER

SQL> select * from ACE_TBS_INFO where RUN_DT > sysdate -3 order by 1,2
2 ;

RUN_ID RUN_DT TBS_NAME TBS_MB TBS_PCT_FULL
---------- --------- ------------------------------ ---------- ------------
3366 08-JUL-12 TBS_CPDC_NDX 729982.25 94.98
3366 08-JUL-12 TBS_CPDC_DAT 834998.94 96.18
3386 09-JUL-12 TBS_CPDC_DAT 842686.94 97.07
3386 09-JUL-12 TBS_CPDC_NDX 733454.25 95.44
3387 09-JUL-12 TBS_CPDC_NDX 734734.25 95.6
3387 09-JUL-12 TBS_CPDC_DAT 845310.94 97.37


I have a years worth of data and I want to sum up the TBS_MS by month.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 7 2012
Added on Jul 10 2012
3 comments
811 views