Para el tunning & monitoreo
/*
select to_char(sysdate,'DD-MM-YYYY'), name,fa.tablespace_name,
to_char(df.size_GB,'99990D99') size_GB,
to_char(fa.free_auto_GB+f.free_GB ,'99990D99') free_total,
to_char((fa.free_auto_GB+f.free_GB)/df.size_GB*100,'990D99') percentage_free
from
v$database,
(select f.tablespace_name,sum(decode(autoextensible,'YES',(maxbytes-f.bytes)/1024/1024/1024,0)) free_auto_GB from dba_data_files f
where f.tablespace_name not like ('%UNDO%')
group by f.tablespace_name) fa,
(select s.tablespace_name,sum(s.bytes/1024/1024/1024) free_GB from dba_free_space s
where s.tablespace_name not like ('%UNDO%')
group by s.tablespace_name) f,
(select df.tablespace_name,sum(decode(autoextensible,'YES',maxbytes,bytes))/1024/1024/1024 size_GB from dba_data_files df
where df.tablespace_name not like ('%UNDO%')
group by df.tablespace_name) df
where fa.tablespace_name=f.tablespace_name
and df.tablespace_name = f.tablespace_name
SELECT TO_CHAR (SYSDATE, 'yyyy/mm/dd hh24:mi:ss ') || SYS_CONTEXT ('USERENV', 'TERMINAL') stid FROM DUAL;
select sid,
opname,
target,
sofar,
totalwork,
units,
(totalwork-sofar)/time_remaining bps,
time_remaining,
sofar/totalwork*100 fertig
SELECT *
from v$session_longops
where time_remaining > 0
*/
No hay comentarios:
Publicar un comentario