Inhaltsverzeichnis

Ora-600 Eintrag für Metrik Test Zwecke im Alert Log erzeugen

Gelegentlich ist es praktisch zu testen ob die Metriken des OEM oder eigene Check Script einen ORA-600 im Alert Log auch richtig finden.

Und auch mal zu testen ob die DB Kollegen Ihr Monitorring regelmäßig kontrollieren .-) .

Exception werfen

DECLARE
   ORA_600 exception;
   pragma exception_init(ORA_600 ,-600);
BEGIN
   raise ORA_600;
END;
/

Erzeugt folgenden Eintrag im Alert.log:

ORA-00600: internal error code, arguments: [], [], [], [], [], [], [], [], [], [], [], []

Event setzen

-- setzen
ALTER SESSION SET events '942 incident(SIMULATED_ERROR)';
 
--Fehler erzeugen
DROP TABLE "_table_not_exists";
 
-- zurücksetzen
ALTER SESSION SET events '942 trace name context off';

Erzeugt folgenden Eintrag:

ORA-00700: soft internal error, arguments: [EVENT_CREATED_INCIDENT], [942], [SIMULATED_ERROR], [], [], [], [], [], [], [], [], []

dbms_system

EXECUTE sys.dbms_system.ksdwrt(2,to_char(sysdate)|| ' ORA-600: Testing Alert ');
EXECUTE sys.dbms_system.ksdwrt(2,to_char(sysdate)|| ' ORA-07445: exception encountered: core dump [kocgor()+96] SIGSEGV] [ADDR:0xF000000104] [PC:0x861B7EC] [Address not mapped to object] [] ');

Erzeugt folgende Einträge:

26.01.16 19:28 ORA-600: Testing Alert 

26.01.16 19:35 ORA-07445: exception encountered: core dump [kocgor()+96] SIGSEGV] [ADDR:0xF000003154] [PC:0x8901B7FC] [Address not mapped to object] [] 

Der Zweite sieht doch schon recht echt aus .-)


oradebug

sqlplus / AS sysdba
 
oradebug unit_test dbke_test dde_flow_kge_soft foo bar baz

Vortrag zum Thema Sicherheit und ORA-600

siehe https://www.pipperr.de/knowhow/ora-600/ora-600_oracle.html


Quellen und weitere Informationen