Re: Tablespace free space

From: Alligator Descartes <v_at_istellar.demon.co.uk>
Date: Mon, 13 Jun 1994 17:04:48 +0000
Message-ID: <771250493snz_at_istellar.demon.co.uk>


In article <2t73u3INNoqq_at_turtle.cis.ohio-state.edu>

           skiba_at_cis.ohio-state.edu "david j skiba" writes:

> How can I find out how much free space I have left in a tablespace?
>
> I have Oracle 6 on a Sun running Solaris...

Run the following script:

----------------8<------------------------8<-------------------
REM
REM tspace.sql: Written by Alligator Descartes REM
REM (c)1994 Interstellar Fruitbat
REM
REM This is a fairly qick hacky script, but it should show you some useful REM information - V.

column TSPACE format a20 heading "Tablespace Name" column TSIZE format 999.99 heading "Size(M)" column LEFT format 999.99 heading "Left(M)" column USED format 999.99 heading "Used(M)" column PERCENT format 99.99 heading "Used(%)"

SELECT DFS.tablespace_name TSPACE,

       DDF.bytes / ( 1024 * 1024 ) TSIZE, 
       sum( DFS.bytes ) / ( 1024 * 1024 ) LEFT,
       DDF.bytes / ( 1024 * 1024 ) - sum( DFS.bytes ) / ( 1024 * 1024 ) USED,
       ( ( ( DDF.bytes / ( 1024 * 1024 ) ) - ( sum( DFS.bytes ) / ( 1024 * 1024 ) ) ) 
         / ( DDF.bytes / ( 1024 * 1024 ) ) * 100 ) PERCENT
FROM dba_free_space DFS, dba_data_files DDF WHERE DFS.tablespace_name = DDF.tablespace_name GROUP BY DFS.tablespace_name, DDF.bytes ORDER BY 1; exit;
/
----------------8<------------------------8<-------------------

Hope this helps.

> thanks
> dave skiba
 

-- 
Alligator Descartes
v_at_istellar.demon.co.uk
Received on Mon Jun 13 1994 - 19:04:48 CEST

Original text of this message