You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alter system kill session and ORA-00031: session marked for kill | Tanel Poder Consulting
I’m sure you are all familiar with this situation:
SQL> alter system kill session '152,33';
alter system kill session '152,33'
*
ERROR at line 1:
ORA-00031: session marked for kill The session trying to issue the kill will hang for 60 seconds and then return this “session marked for kill” message. And the target session does not get killed at all.
So why is that?
The issue is in what this alter system kill command is doing. It’s not actually killing the target session (like kill -9 would do for OS processes). It just sets a bit in the target sessions state object, which marks that the target session should end. But its entirely up the target session to check this bit and act on it!
So,
One experience feedback about unkillable processes: in Linux, it happened to us that we could not "kill -KILL" or "kill -9" a session. It turned out that this was a bug in the Veritas kernel driver for the Veritas filesystem when we tried to allocate a disk segment > 4 TB. We could not even shutdown the OS, we had to power it off and reboot. As the problem was reproducible, Veritas provided a patch.
Summary: if a process is not killable on the OS level, it is very likely that it is a kernel process. Processes in user space can be killed by the OS.
Alter system kill session and ORA-00031: session marked for kill | Tanel Poder Consulting
I’m sure you are all familiar with this situation:
SQL> alter system kill session '152,33';
alter system kill session '152,33'
*
ERROR at line 1:
ORA-00031: session marked for kill The session trying to issue the kill will hang for 60 seconds and then return this “session marked for kill” message. And the target session does not get killed at all.
So why is that?
The issue is in what this alter system kill command is doing. It’s not actually killing the target session (like kill -9 would do for OS processes). It just sets a bit in the target sessions state object, which marks that the target session should end. But its entirely up the target session to check this bit and act on it!
So,
https://tanelpoder.com/2009/08/13/alter-system-kill-session-and-ora-00031-session-marked-for-kill/
The text was updated successfully, but these errors were encountered: