表空间sql
COL use_rage FOR a10SELECT UPPER(f.tablespace_name) tablespace_name,d.Tot_grootte_Mb total_Mb,d.Tot_grootte_Mb - f.total_bytes used_Mb,TO_CHAR(ROUND((d.Tot_grootte_Mb - f.total_bytes) / d.Tot_grootte_Mb * 100,2),'990.99') use_rage,f.total_bytes free_Mb,f.max_bytes max_block FROM (SELECT tablespace_name,ROUND(SUM(bytes)/(1024*1024),2) total_bytes,ROUND(MAX(bytes)/(1024*1024),2) max_bytesFROM sys.DBA_FREE_SPACEGROUP BY tablespace_name) f,(SELECT dd.tablespace_name, ROUND(SUM(dd.bytes)
Runstats 脚本
转Thomas Kyte's Runstats 功能对比sql之间的parse,latch等等[@more@]Requirements In order to run this test harness you must at a minimum have: Access to V$STATNAME, V$MYSTAT, v$TIMER and V$LATCH You must be granted select DIRECTLY on SYS.V_$STATNAME, SYS.V_$MYSTAT, SYS.V_$TIMER and SYS.V_$LATCH. It will not work to have select on these via a ROLE. (conn / as sysdbagrant select on SYS.V_$STATNAME to USER...)The ability to create a table -- run_stats -- to hold the before, during and after informati