Understanding Locking in Oracle
Understanding Locking in Oracle
CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
0 pts/tb 22509 tgorman 240 20 1788K 880K run 3:39 16.55 16.52 bcp
2 pts/tb 22515 tgorman 152 20 6788K 5652K run 2:57 14.01 13.99 sqll
2 pts/th 22890 tgorman 236 20 716K 316K run 0:52 11.44 11.42 dump
3 ? 22712 oracle 154 20 9344K 1904K sleep 1:38 11.34 11.32 orac
UNIX diagnostics
• UNIX utility “ps”
– Standard SysV version
$ ps -eaf
– XPG3/4 (X/Open Portability Guide v3/4)
$ ps –eo opt[,opt…]
– Provides info about processes
• Status, PID, user, command text,
• Cumulative and recent CPU
• Memory (virtual, resident)
UNIX diagnostics
• An easy home-grown “top” command
• File dumps:
– Dump contents of the control file(s):
SQL> ALTER SESSION SET EVENTS 'immediate trace name
controlf level 10';
• For example:
Response Time
Time Percentage Per Execute Per User Call Per Transactions
CPU Time
Wait Time
Event Time Perc Per Execute Per User Call Per Transaction