Last updated 1 year ago
Was this helpful?
การตรวจสอบ Error ของ Database บน Oracle โดยปกติเราสามารถตรวจสอบ Error ที่พบได้จาก Automatic Diagnostic Repository ( ADR ) แต่จะไม่สะดวกในการเรียกดู Error ย้อนหลัง
ทำการ Connect Database ด้วย SQL*Plus
sqlplus / as sysdba
ทำการ Find Error ย้อนหลัง 365 วัน
set linesize 150 ;
col record_id for 9999999 head ID ;
col message_text for a120 head message ;
select record_id, to_char(originating_timestamp,'DD-MON-YYYY HH24:MI:SS') "TIMESTAMP", message_text from X$DBGALERTEXT where originating_timestamp > systimestamp - 365 and regexp_like(message_text, '(ORA-|error)') order by record_id ;
ID TIMESTAMP message -------- -------------------- ----------------------------- 32109 17-APR-2021 00:00:19 ORA-00060: Deadlock detected.
อ่านเพิ่มเติม :