ORA-00031: session marked for kill
1. Kill a session, returned the message below.
SQL> alter system kill session ‘1022,851’;
alter system kill session ‘1022,851’
*
ERROR at line 1:
ORA-00031: session marked for kill
2. Find out the OS process id
SQL> select a.spid,b.sid,b.serial#,b.username from v$process a,v$session b where a.addr=b.paddr and b.status=’KILLED’;
SPID SID SERIAL# USERNAME
———— ———- ———- ——————————
15198 ########## 851 EHEALTH
3. Go to OS to find the server process
[oracle@yplodb02 ~]$ ps -ef|grep 15198
oracle 15198 1 1 Jan20 ? 03:41:07 oracleehealthp1 (LOCAL=NO)
oracle 9140 13829 0 15:38 pts/4 00:00:00 grep 15198
4. Kill it by OS command
[oracle@yplodb02 ~]$ kill -9 15198
[oracle@yplodb02 ~]$ ps -ef|grep 15198
oracle 12522 13829 0 15:38 pts/4 00:00:00 grep 15198
Purge dba_scheduler_job_log
SQL> exec DBMS_SCHEDULER.PURGE_LOG();