› Fóruns › Banco de dados Oracle › Aumentar o Tamanho da Tablespaces › Aumentar o Tamanho da Tablespaces
Este aqui também é bem completo:
def gTitulo = ‘Sumario de Espacos Livres de Tablespaces’
— Tablespace criticas (10% espaco livre) com um ‘*’ na ultima coluna
set linesize 200
set pagesize 300
comp sum of totsiz avasiz usosiz on report
break on report
col tsname format a18 heading ‘Tablespace’
col nfrags format 99,990 heading ‘Nro|Frags’
col mxfrag format 999,999,990 heading ‘Maior|Frag(MB)’
col avfrag format 999,999,990 heading ‘Media|Frags(MB)’
col totsiz format 999,999,990 heading ‘Total|(MB)’
col avasiz format 999,999,990 heading ‘Livre|(MB)’
col usosiz format 999,999,990 heading ‘Usado|(MB)’
col pctfre format a04 heading ‘Percentual|Livre’
col warn format a1 heading ‘W’
select
total.tablespace_name tsname,
count(free.bytes) nfrags,
nvl(max(free.bytes)/1024/1024,0) mxfrag,
nvl(avg(free.bytes)/1024/1024,0) avfrag,
total.bytes/1024/1024 totsiz,
nvl(sum(free.bytes)/1024/1024,0) avasiz,
(total.bytes/1024/1024-nvl(sum(free.bytes)/1024/1024,0)) usosiz,
round(nvl(sum(free.bytes),0)/total.bytes100)||’%’ pctfre,
decode(greatest(100nvl(sum(free.bytes),0)/total.bytes,10),
10,’*’, ‘ ‘) warn
from
( select tablespace_name,
sum(bytes) bytes
from sys.dba_data_files
group by tablespace_name) total,
dba_free_space free
where
total.tablespace_name = free.tablespace_name(+)
group by
total.tablespace_name,
total.bytes
/
undefine gScript
undefine gTitulo
ttitle off
btitle off
clear column
clear breaks