How to Check Wait Event in Oracle Database ? DBA scripts to check Wait Event in Oracle Database?
Amen Answered question 18/04/2023
DBA scripts to Check Wait Event in Oracle Database:
SQL > set colsep '|' set pagesize 2000 set linesize 150 column username format a15 column sid format 9999 column status format a10 column event format a30 column name format a30 column p1 format a20 column p2 format a20 column p3 format a20 SQL > select v.sid, v.username username, v.status status, n.name, w.state, n.parameter1 || ' : ' || w.p1 p1, n.parameter2 || ' : ' || w.p2 p2, n.parameter3 || ' : ' || w.p3 p3 from v$session v, v$event_name n , v$session_wait w where v.username is not null and w.event = n.name and w.sid=v.sid and w.event not in('null event') and v.STATUS='ACTIVE' /
Example:
SID|USERNAME |STATUS |NAME |STATE |P1 |P2 |P3 -----|---------------|----------|------------------------------|-------------------|--------------------|--------------------|-------------------- 4914|PUBLIC |ACTIVE |class slave wait |WAITING |slave id : 0 | : 0 | : 0 4536|PUBLIC |ACTIVE |class slave wait |WAITING |slave id : 0 | : 0 | : 0 3027|PUBLIC |ACTIVE |class slave wait |WAITING |slave id : 0 | : 0 | : 0 4540|P1RPHWGBM |ACTIVE |db file sequential read |WAITING |file# : 103 |block# : 1490384 |blocks : 1 3023|P1RPHWGBM |ACTIVE |direct path read |WAITED SHORT TIME |file number : 105 |first dba : 1383936 |block cnt : 128 23|P1RPHWGBM |ACTIVE |PX Deq: Table Q Normal |WAITED KNOWN TIME |sleeptime/senderid :|passes : 3 | : 0 | | | | | 200 | | 2289|P1RPHWGBM |ACTIVE |SQL*Net message to client |WAITED SHORT TIME |driver id : 14136975|#bytes : 1 | : 0 | | | | |36 | | 1888|SYS |ACTIVE |SQL*Net message to client |WAITED SHORT TIME |driver id : 16508152|#bytes : 1 | : 0 | | | | |32 | | 4178|P1RPHWGBM |ACTIVE |enq: PS - contention |WAITING |name|mode : 13476167|instance : 1 |slave ID : 4 | | | | |74 | | 4927|P1RPHWGBM |ACTIVE |enq: BF - allocation contentio|WAITING |name|mode : 11118837|node#/parallelizer# |bloom# : 0 | | | | |82 |: 875663873 |
Amen Answered question 18/04/2023