I have already posted the script for tracking the growth of the Database .Sometimes it may be requires to find the growth of each tablespace . I have google and find the script for tracking the growth of each tablespace with date-wise. I thanks Hasan Shaharear for sharing such a good scripts. This scripts donot shows the growth of system and sysaux tablespace growth rate. Below is the script .
SQL> set heading on
SQL> set linesize 5500
SQL> SELECT TO_CHAR (sp.begin_interval_time,'DD-MM-YYYY') days
2 , ts.tsname
3 , max(round((tsu.tablespace_size* dt.block_size )/(1024*1024),2) ) cur_size_MB
4 , max(round((tsu.tablespace_usedsize* dt.block_size )/(1024*1024),2)) usedsize_MB
5 FROM DBA_HIST_TBSPC_SPACE_USAGE tsu
6 , DBA_HIST_TABLESPACE_STAT ts
7 , DBA_HIST_SNAPSHOT sp
8 , DBA_TABLESPACES dt
9 WHERE tsu.tablespace_id= ts.ts#
10 AND tsu.snap_id = sp.snap_id
11 AND ts.tsname = dt.tablespace_name
12 AND ts.tsname NOT IN ('SYSAUX','SYSTEM')
13 GROUP BY TO_CHAR (sp.begin_interval_time,'DD-MM-YYYY'), ts.tsname
14 ORDER BY ts.tsname, days;
DAYS TSNAME CUR_SIZE_MB USEDSIZE_MB
------------- --------- ------------- ---------------
07-12-2011 SDE 2448 1813.94
08-12-2011 SDE 2448 1813.94
09-12-2011 SDE 2448 1813.94
10-12-2011 SDE 2448 1813.94
11-12-2011 SDE 2448 1815.94
12-12-2011 SDE 2448 1815.94
13-12-2011 SDE 2448 1816
14-12-2011 SDE 2448 1816
15-12-2011 SDE 2448 1816
16-12-2011 SDE 2448 1816
07-12-2011 UNDOTBS1 4950 196.56
08-12-2011 UNDOTBS1 4950 302.56
09-12-2011 UNDOTBS1 4950 427.63
10-12-2011 UNDOTBS1 4950 348.56
11-12-2011 UNDOTBS1 6210 5317
12-12-2011 UNDOTBS1 6210 532.5
13-12-2011 UNDOTBS1 6210 388.56
14-12-2011 UNDOTBS1 6210 422.5
15-12-2011 UNDOTBS1 6210 585.63
16-12-2011 UNDOTBS1 6210 479.5
07-12-2011 USERS 20480 19941.88
08-12-2011 USERS 20480 20001.5
09-12-2011 USERS 20480 20341.56
10-12-2011 USERS 20480 20467.25
11-12-2011 USERS 20480 20336.69
12-12-2011 USERS 20480 20317.13
13-12-2011 USERS 20480 20267.31
14-12-2011 USERS 20480 20346.13
15-12-2011 USERS 20480 20340.06
16-12-2011 USERS 20480 20330.81
30 rows selected.
Enjoy :-)
3 comments:
Thanks! Finally, I found a script that works!
That was what I was looking for
That was what I was looking for
Post a Comment