— AWS for Oracle —
RDS For Oracle Alertlog確認
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
## 20251204_【本番環境】MLOG表領域使用率、アラートログ確認 su - oracle tgkbn2024@APAWS whoami export TMOUT=0;echo ${TMOUT} cd /var/kiban_work/DB;pwd sqlplus APSYS/MvrR9zyC_nmfn5@CIMEBP1 --------------------------------------------------------------- set tab off trims on set lin 250 pages 50000 set colsep ';' select instance_name from v$instance; show user -- 表領域使用状況 SELECT d.tablespace_name "表領域名", TO_CHAR((a.bytes/1024/1024),'999,999,999,999.900') "サイズ(M)", TO_CHAR(((a.bytes-DECODE(f.bytes,NULL,0,f.bytes))/1024/1024),'999,999,999,999.900') "使用量(M)", TO_CHAR((DECODE(f.bytes,NULL,0,f.bytes)/1024/1024),'999,999,999,999.900') "空き容量(M)", TO_CHAR(((a.bytes-DECODE(f.bytes,NULL,0,f.bytes))/1024/1024)/(a.bytes/1024/1024)*100,'999.90') "使用率(%)" FROM sys.dba_tablespaces d, sys.sm$ts_avail a, sys.sm$ts_free f WHERE d.tablespace_name=a.tablespace_name AND f.tablespace_name (+)= d.tablespace_name ORDER BY "表領域名"; col owner for a25 col object_type for a40 col segment_type for a40 col segment_name for a30 col tablespace_name for a30 col "SIZE(MB)" for 999,999,999 -- MLOGセグメントサイズ select owner,segment_name,segment_type,sum(bytes/1024/1024) as "SIZE(MB)" from dba_segments where tablespace_name='TSP_CIUSER_MLG01' group by owner,segment_name,segment_type order by "SIZE(MB)"; set tab off trims on set lin 300 pages 50000 set colsep ';' col message_text for a200 col originating_timestamp for a30 -- アラートログ select indx,originating_timestamp,message_text from alertlog where message_text like '%MVRF%' order by indx; -- アラートログ select indx,originating_timestamp,message_text from alertlog order by indx; exit --------------------------------------------------------------- exit exit |