Re: Solution from the space monitoring scripts

From: Mark D Powell <Mark.Powell2_at_hp.com>
Date: Fri, 16 Jul 2010 13:08:25 -0700 (PDT)
Message-ID: <d4833f6d-b3c6-444a-8e1e-824aa67f0d33_at_q22g2000yqm.googlegroups.com>



On Jul 16, 12:37 pm, Mladen Gogala <n..._at_email.here.invalid> wrote:
> For years, I had my own scripts that were calculating the available free
> space from dba_free_space and dba_data_files. I just discovered the
> DBA_TABLESPACE_USAGE_METRICS table which has the necessary information,
> presented in an easily usable way:
>
>  desc DBA_TABLESPACE_USAGE_METRICS
>  Name                                      Null?    Type
>  ----------------------------------------- --------
> ----------------------------
>  TABLESPACE_NAME                                    VARCHAR2(30)
>  USED_SPACE                                         NUMBER
>  TABLESPACE_SIZE                                    NUMBER
>  USED_PERCENT                                       NUMBER
>
> Good job!
> --http://mgogala.byethost5.com

It should probably be noted that this view is available on 10g and up.

The view could probably use an indicator for if any of the tablespace datafiles are auto-extendable and perhaps a second space calculation based on maximum size possible, but it is fast.

HTH -- Mark D Powell -- Received on Fri Jul 16 2010 - 15:08:25 CDT

Original text of this message