ThatJeffSmith

Locks and Killing Sessions in Oracle SQL Developer

Getting the Windows ‘busy’ hourglass cursor is sure to raise anyone’s blood pressure. Sometimes you’re left there waiting because a resource you’re attempting to access is already being used by someone else. So you get to WAIT. You are being BLOCKED because what you want is LOCKED. How can you see what the hold-up is?

And more importantly, how can we figure out who or what is causing the delay so we can go KILL them (their session, cough!)

Tools -> Monitor Sessions

This is an enhanced report. There is a report version of this under the Database Administration and Sessions category. What makes this report ‘enhanced’ is that it has a context menu available that allows me to start a trace, or execute a ‘kill.’

Inactive? Someone is just begging to be 'let go.'

Inactive? Someone is just begging to be ‘let go.’

My session is SID #16. SID #25 is holding me up. Maybe I should go check what they’re doing…

That looks like something I would write, wait as second...

That looks like something I would write, wait as second…

This is a snippet from a handy little report called ‘Blocking Locks by User.’ It’s available under the Database Administration and Locks report category.

Ok, now I know what I need to do :)

Kill is such a harsh word. Maybe we should call it a RIF?

Kill is such a harsh word. Maybe we should call it a RIF?

And cue the music…