[ORACLE] 테이블스페이스 용량산정 쿼리
SELECT A.TABLESPACE_NAME "테이블스페이스명", (A.BYTES - B.FREE) "사용공간", B.FREE "여유 공간", A.BYTES "총크기", TO_CHAR( (B.FREE / A.BYTES * 100) , '999.99')||'%' "여유공간" FROM ( SELECT FILE_ID, TABLESPACE_NAME, SUBSTR(FILE_NAME,1,200) FILE_NM, SUM(BYTES) BYTES FROM DBA_DATA_FILES GROUP BY FILE_ID,TABLESPACE_NAME,SUBSTR(FILE_NAME,1,200) ) A, ( SELECT TABLESPACE_NAME, FILE_ID, SUM(NVL(BYTES,0)) FREE FROM DBA_FREE_S..
[oracle] 모니터링 sql
--1. Buffer Cache Hit RatioSELECT ROUND(((1-(SUM(DECODE(name, 'physical reads', value,0))/ (SUM(DECODE(name, 'db block gets', value,0))+ (SUM(DECODE(name, 'consistent gets', value, 0))))))*100),2) || '%' "Buffer Cache Hit Ratio" FROM V$SYSSTAT;--2. Library Cache Hit RatioSELECT (1-SUM (reloads)/SUM(pins))*100 "Library Cache Hit Ratio" From V$LIBRARYCACHE; --3. Data Dictionary Cache Hit RatioSELE..