From: Mladen Gogala on 16 Jul 2010 12:37 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
From: Mark D Powell on 16 Jul 2010 16:08 On Jul 16, 12:37 pm, Mladen Gogala <n...(a)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 --
|
Pages: 1 Prev: Another annoying delay Next: Oracle 11.2.0.1 does it contain 11.1.0.7. |