Oracle - Tamaño Tablespace

 
Vista:

Tamaño Tablespace

Publicado por bosco Mora (19 intervenciones) el 11/03/2002 16:42:37
espero que este script te sirva

set heading off
set pages 999
set lines 150
set pause off

create table FREE as
select tablespace_name, sum(bytes)/1024 Free
from dba_free_space
group by tablespace_name;

create table FULL as
select tablespace_name, sum(bytes)/1024 Full
from dba_data_files
group by tablespace_name;

spool Crecimiento&servidor

accept Porcentaje prompt 'Porcentaje Mínimo a evaluar : '
select
'SID: ' || value || ' ' ||
'FECHA: ' || to_char(sysdate,'DD-MON-YYYY HH:MI:SS')
from
v$parameter
where
name like 'db_name'
/
set heading on
set verify off
select a.tablespace_name, Full "Tamaño Real (Kb)", Free "Tamaño Libre (Kb)",
Round(Free*100/Full,2) "% Libre"
from FULL a, FREE b
where a.tablespace_name (+)= b.tablespace_name and
Round(Free*100/Full,2) < &Porcentaje
order by 4
/

spool off
drop table FREE;
drop table FULL;
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder