Home » RDBMS Server » Server Administration » monitoring tablespace
monitoring tablespace [message #52930] Wed, 21 August 2002 01:23 Go to next message
ritesh kumar tiwary
Messages: 7
Registered: August 2002
Junior Member
Hi,
Can anybody please send me a script for monitoring tablespace growth on daily and/or weekly and/or monthly basis? Thanks in advance!
ritesh
Re: monitoring tablespace [message #52936 is a reply to message #52930] Wed, 21 August 2002 04:52 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
column "Total Bytes" format 9,999,999,999 
column "SQL Blocks" format 999,999,999 
column "VMS Blocks" format 999,999,999 
column "Bytes Free" format 9,999,999,999 
column "Bytes Used" format 9,999,999,999 
column "% Free" format 9999.999 
column "% Used" format 9999.999 
break on report 
compute sum of "Total Bytes" on report 
compute sum of "SQL Blocks" on report 
compute sum of "VMS Blocks" on report 
compute sum of "Bytes Free" on report 
compute sum of "Bytes Used" on report 
compute avg of "% Free" on report 
compute avg of "% Used" on report 
select  substr(fs.FILE_ID,1,3) "ID#", 
        fs.tablespace_name, 
        df.bytes "Total Bytes", 
        df.blocks "SQL Blocks", 
        df.bytes/512 "VMS Blocks", 
        sum(fs.bytes) "Bytes Free", 
        (100*((sum(fs.bytes))/df.bytes)) "% Free", 
        df.bytes-sum(fs.bytes) "Bytes Used", 
    (100*((df.bytes-sum(fs.bytes))/df.bytes)) "% Used" 
from sys.dba_data_files df, sys.dba_free_space fs 
where df.file_id(+) = fs.file_id 
group by fs.FILE_ID, fs.tablespace_name, df.bytes, df.blocks 
order by fs.tablespace_name; 

local@ > /

ID# TABLESPACE_NAME                Total Bytes SQL Blocks VMS Blocks Bytes Free     % Free Bytes Used     % Used
--- ------------------------------ ----------- ---------- ---------- ---------- ---------- ---------
6   INDX                              60817408       7424     118784   55042048 90.5037716    5775360 9.49622845
7   OEM_REPOSITORY                    31465472       3841      61456   31260672 99.3491278     204800 .650872169
2   RBS                              545259520      66560    1064960  515891200 94.6138822   29368320 5.38611779
8   RCVAT                             52428800       6400     102400   52420608  99.984375       8192    .015625
1   SYSTEM                            79822848       9744     155904   23592960 29.5566502   56229888 70.4433498
4   TEMP                              75497472       9216     147456   75489280 99.9891493       8192 .010850694
5   TOOLS                             12582912       1536      24576   12574720 99.9348958       8192 .065104167
3   USERS                            113246208      13824     221184  113238016 99.9927662       8192 .007233796
                                   ----------- ---------- ---------- ---------- ---------- ---------- ----------
avg                                                                             89.2405773            10.7594227
sum                                  971120640     118545    1896720  879509504              91611136

Re: monitoring tablespace [message #52953 is a reply to message #52930] Wed, 21 August 2002 11:44 Go to previous message
Trifon Anguelov
Messages: 514
Registered: June 2002
Senior Member
You have store the tablespace size over the time in some table, then all subsequential queries will get you the delta of the size.

Ready to use script could be find Here or you can check Oracle 8i DBA Handbook from Kevin Loney (nice growth monitoring scripts there).

Hope that helps,

clio_usa
OCP - DBA

Visit our Web site

Previous Topic: Optimal setting on rollback segments
Next Topic: Database doen't open automaticaly
Goto Forum:
  


Current Time: Thu Dec 26 10:26:20 CST 2024