Tanel Poder directed me to Miladin Modrakovic blog, I will definitely add this to my prefered feed.
You have to try this :
SQL> alter session set events 'immediate crash';
alter session set events 'immediate crash'
*
ERROR at line 1:
ORA-03113: end-of-file on communication channel
A very decent method for killing yourself 😈
This trick can actually be useful in a case where you want to kill a stuck process, but don’t have OS access (there are unfortunately many shops where DBAs have no access to servers at all).
You just send the crash event to Oracle using oradebug and assuming that the stuck target processes signal handling isn’t blocked it will crash itself:
http://blog.tanelpoder.com/2008/06/19/killing-an-oracle-process-from-inside-oracle/
or to test how to catch ora-3113 in a package 😉
Nice 🙂
I like it.
Oracle …set events ‘immediate crash’, that look like “Hard Core”!
😉
Hey, that’s a piece of gold Grimm!
Thanks for this!
That is nice!
You can use also event 10237.
Session 1
– – – – – – –
SQL> begin
2 while 2>1 loop
3 null;
4 end loop;
5 end;
6 /
Session 2 (as user SYS or as user who has privilege to execute the package DBMS_SYSTEM.SET_EV)
———-
SQL> exec dbms_system.set_ev(sid,serial#,10237,4,”);
PL/SQL procedure successfully completed.
Session 1
————-
ERROR at line 1:
ORA-01013: user requested cancel of current operation
The session is not killed, user is still connected –
SQL> select * from v$version;
BANNER
——————————————————————————–
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 – 64bit
…
…
No problem, you are welcome :).
Quite good site, by the way.
Pingback: Little known but useful facts about Oracle « Klein Oracle denkraam