2026-03-12 20:23:15

This commit is contained in:
root
2026-03-12 21:23:47 +01:00
parent eab4b36eca
commit 93039b8489
3332 changed files with 699614 additions and 0 deletions

51
vg/oradebug_commands.sql Normal file
View File

@@ -0,0 +1,51 @@
CONN sys/password AS SYSDBA; -- User must have SYSDBA.
oradebug SETORAPNAME PR00 -- Debug process by name.
ORADEBUG SETMYPID; -- Debug current session.
ORADEBUG SETOSPID 1234; -- Debug session with the specified OS process.
ORADEBUG SETORAPID 123456; -- Debug session with the specified Oracle process ID.
ORADEBUG TRACEFILE_NAME; -- Display the current trace file.
oradebug UNLIMIT -- Set trace to unlimited size.
-- Start SQL Trace
ORADEBUG EVENT 10046 TRACE NAME CONTEXT FOREVER, LEVEL 12;
-- Stop SQL Trace
ORADEBUG EVENT 10046 TRACE NAME CONTEXT OFF;
-- Start Optimizer Trace
ORADEBUG EVENT 10046 TRACE NAME CONTEXT FOREVER, LEVEL 12;
exec dbms_monitor.session_trace_enable (session_id=>123,serial_num=>123, waits=> TRUE, binds=> true );
exec dbms_monitor.session_trace_disable (session_id=>123,serial_num=>123);
-- Trace user's own session
exec dbms_monitor.session_trace_enable (NULL,NULL,TRUE,TRUE) ;
exec dbms_monitor.session_trace_disable ;
-- List Online patches
ORADEBUG patch list
--*************************************
-- Dump HangAnalyze on all RAC nodes.
--*************************************
sqlplus "/as sysdba"
oradebug setmypid
oradebug unlimit
oradebug -g all dump hanganalyze 3
oradebug -g all dump systemstate 258
<<wait for 1 mins>>
oradebug -g all dump hanganalyze 3
oradebug -g all dump systemstate 258
oradebug tracefile_name
<<wait for 1 mins>>
oradebug -g all dump hanganalyze 3
oradebug -g all dump systemstate 258
oradebug tracefile_name