Results 1 to 3 of 3
  1. #1
    Join Date
    May 2009

    Unanswered: How much O/S disk space left for a tablespace?

    hi Guys

    Apologies up front if this is a trivial question, but i am a relative newbie with Oracle..

    We are running ORACLE 10g on LINUX.

    If i have a tablespace, 'XYZ' and i want to ensure that there is sufficient space allocated for it to grow, i can query the 'dba_data_files' view. For each datafile in that tablespace there is a record, showing (amongst other things) the maximum size allocated (maxbytes) and the amount of space used thus far (bytes).
    And if there is more than one datafile for that tablespace, then obviously once can get a wholistic picture by simply summing the 'bytes' column and comparing that with the sum of the (maxbyets) column to see if one has to extend the tablespace by either extending one of the datafiles or by adding another datafile.

    Now this is all good and well for determining whether or not i need to allocate more tablespace by extending datafiles or adding datafiles... and this i can check every day via a simple SQL statement which queries the 'dba_data_files' view...

    The problem is i also want to know what the situation is with the operating system space on the volume which houses the datafiles...
    Currently i simply do a
    df -h
    on the ORACLE server and then manually look at the storage situation on the volume housing the datafiles.

    My question is whether i can do this O/S check using an ORACLE query?
    So is there for example a table or view which has information on the space situation of the underlying O/S? Kinda like the results of a 'df -h' ?

    many thanks

  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    >So is there for example a table or view which has information on the space situation of the underlying O/S?
    No such table exists by default.
    Nothing prevents you from creating such a table & populating it via a script daily.

    Typically 1 tablespace grows faster than the other tablespaces.
    You should be able to estimate/compute the daily/weekly growth amount.
    For example, TS1 grows by 50MB per day or 350MB per week.
    Now if MAX file size is 25GB, this means each file holds about 7 weeks worth of data.
    So you really only need to check disk space about once a month.
    When the TS is more than 50% full, then add a new file.
    Last edited by anacedent; 12-14-09 at 23:34.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    May 2009
    thank you very much for the help. i currently use the method of estimating growth for a week or month at a time - based on the main fast growing tablespaces.

    However our sys admin guys were hoping to be able to get the underlying O/S space "the easy way" via a daily report. So i'll just follow up with them then on the idea of populating a table with O/S space data obtained from a script.

    thanks again

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts