alphamek 2 Denunciar post Postado Novembro 6, 2005 Olá, Esse script gerencia o espaço livre e total das tablespaces da instância. Ótimo para monitoramento. SET SERVEROUTPUT ONSET PAGESIZE 1000SET LINESIZE 255SET FEEDBACK OFFSELECT Substr(df.tablespace_name,1,20) "Tablespace Name", Substr(df.file_name,1,40) "File Name", Round(df.bytes/1024/1024,2) "Size (M)", Round(e.used_bytes/1024/1024,2) "Used (M)", Round(f.free_bytes/1024/1024,2) "Free (M)", Rpad(' '|| Rpad ('X',Round(e.used_bytes*10/df.bytes,0), 'X'),11,'-') "% Used"FROM DBA_DATA_FILES DF, (SELECT file_id, Sum(Decode(bytes,NULL,0,bytes)) used_bytes FROM dba_extents GROUP by file_id) E, (SELECT Max(bytes) free_bytes, file_id FROM dba_free_space GROUP BY file_id) fWHERE e.file_id (+) = df.file_idAND df.file_id = f.file_id (+)ORDER BY df.tablespace_name, df.file_name;PROMPTSET FEEDBACK ONSET PAGESIZE 18 Abraços, http://forum.imasters.com.br/public/style_emoticons/default/clap.gif Compartilhar este post Link para o post Compartilhar em outros sites