Issue:
ORA-12012: error on auto execute of job 19028
ORA-04021: timeout occurred while waiting to lock object XXXXX.GHT_PROCESS
ORA-06508: PL/SQL: could not find program unit being called: "XXXXX.GHT_PROCESS"
ORA-06512: at "XXXXX.GHT_BACKEND_PROCESS", line 33
ORA-06512: at "XXXXX.GHT_BACKEND_PROCESS", line 33
Fix :
SQL> select /*+ ordered */ w1.sid waiting_session, h1.sid holding_session, w.kgllktype lock_or_pin, w.kgllkhdl address, decode(h.kgllkmod, 0, 'None', 1, 'Null', 2, 'Share', 3, 'Exclusive', 'Unknown') mode_held, decode(w.kgllkreq, 0, 'None', 1, 'Null', 2, 'Share', 3, 'Exclusive', 'Unknown') mode_requested
from dba_kgllock w, dba_kgllock h, v$session w1, v$session h1
2 3 where
4 (((h.kgllkmod != 0) and (h.kgllkmod != 1)
and ((h.kgllkreq = 0) or (h.kgllkreq = 1)))
5 6 and
(((w.kgllkmod = 0) or (w.kgllkmod= 1))
7 8 and ((w.kgllkreq != 0) and (w.kgllkreq != 1))))
and w.kgllktype = h.kgllktype
9 10 and w.kgllkhdl = h.kgllkhdl
and w.kgllkuse = w1.saddr
11 12 and h.kgllkuse = h1.saddr
/ 13
WAITING_SESSION HOLDING_SESSION LOCK ADDRESS MODE_HELD MODE_REQU
--------------- --------------- ---- ---------------- --------- ---------
795 1950 Pin 000000028D148D08 Share Share
1141 1950 Pin 000000028D148D08 Share Share
1178 1950 Pin 000000028D148D08 Share Exclusive
SQL> select to_name from v$object_dependency where to_address = '000000028D148D08';
no rows selected
SQL> select
2 'spid, Sid, Serial# : '|| p.spid ||' , '|| s.sid||','||s.serial# a,
3 'DB User / OS User : '||s.username||' / '||s.osuser a,
4 'Login Time : '||TO_CHAR(s.logon_time,'mm-dd-yyyy::hh24:mi:ss'),
5 'Date : '||TO_CHAR((TO_DATE('01-JAN-00')+(SYSDATE-logon_time)),'HH24:MI:SS') run_Time,
6 'Module : '||s.module "Module Name" ,
7 'Clients Process : '||s.process ,
8 'Action : '||s.action,
9 'Program : '||s.program,
10 'Clients Machine Name : '||s.machine,
'Terminal : '||P.terminal,
11 12 'last call et : '||s.last_call_et ,
13 'Status : '||s.status
14 from v$session s, v$process p , v$session_wait w
where s.paddr = p.addr and s.sid = w.sid
and s.sid=&sid
15 16 17 order by s.logon_time;
Enter value for sid: 1950
old 16: and s.sid=&sid
new 16: and s.sid=1950
spid, Sid, Serial# : 12619 , 1950,13091
DB User / OS User : XXXXX / oracle
Login Time : 03-07-2018::11:45:12
Date : 09:00:44
Module :
Clients Process : 12619
Action :
Program : oracle@TIG-DB-01 (J000)
Clients Machine Name : TIG-DB-01
Terminal : UNKNOWN
last call et : 637244
Status : ACTIVE
SQL> alter system kill session '1950,13091' immediate;
alter system kill session '1950,13091' immediate
*
ERROR at line 1:
ORA-00031: session marked for kill
SQL> SQL> 2 3 'DB User / OS User : '||s.username||' / '||s.osuser a,
4 'Login Time : '||TO_CHAR(s.logon_time,'mm-dd-yyyy::hh24:mi:ss'),
'Date : '||TO_CHAR((TO_DATE('01-JAN-00')+(SYSDATE-logon_time)),'HH24:MI:SS') run_Time,
5 6 'Module : '||s.module "Module Name" ,
7 'Clients Process : '||s.process ,
8 'Action : '||s.action,
'Program : '||s.program,
9 10 'Clients Machine Name : '||s.machine,
11 'Terminal : '||P.terminal,
'last call et : '||s.last_call_et ,
12 13 'Status : '||s.status
14 from v$session s, v$process p , v$session_wait w
where s.paddr = p.addr and s.sid = w.sid
15 16 and s.sid=&sid
17 order by s.logon_time;
Enter value for sid: 1950
old 16: and s.sid=&sid
new 16: and s.sid=1950
no rows selected
ORA-12012: error on auto execute of job 19028
ORA-04021: timeout occurred while waiting to lock object XXXXX.GHT_PROCESS
ORA-06508: PL/SQL: could not find program unit being called: "XXXXX.GHT_PROCESS"
ORA-06512: at "XXXXX.GHT_BACKEND_PROCESS", line 33
ORA-06512: at "XXXXX.GHT_BACKEND_PROCESS", line 33
Fix :
SQL> select /*+ ordered */ w1.sid waiting_session, h1.sid holding_session, w.kgllktype lock_or_pin, w.kgllkhdl address, decode(h.kgllkmod, 0, 'None', 1, 'Null', 2, 'Share', 3, 'Exclusive', 'Unknown') mode_held, decode(w.kgllkreq, 0, 'None', 1, 'Null', 2, 'Share', 3, 'Exclusive', 'Unknown') mode_requested
from dba_kgllock w, dba_kgllock h, v$session w1, v$session h1
2 3 where
4 (((h.kgllkmod != 0) and (h.kgllkmod != 1)
and ((h.kgllkreq = 0) or (h.kgllkreq = 1)))
5 6 and
(((w.kgllkmod = 0) or (w.kgllkmod= 1))
7 8 and ((w.kgllkreq != 0) and (w.kgllkreq != 1))))
and w.kgllktype = h.kgllktype
9 10 and w.kgllkhdl = h.kgllkhdl
and w.kgllkuse = w1.saddr
11 12 and h.kgllkuse = h1.saddr
/ 13
WAITING_SESSION HOLDING_SESSION LOCK ADDRESS MODE_HELD MODE_REQU
--------------- --------------- ---- ---------------- --------- ---------
795 1950 Pin 000000028D148D08 Share Share
1141 1950 Pin 000000028D148D08 Share Share
1178 1950 Pin 000000028D148D08 Share Exclusive
SQL> select to_name from v$object_dependency where to_address = '000000028D148D08';
no rows selected
SQL> select
2 'spid, Sid, Serial# : '|| p.spid ||' , '|| s.sid||','||s.serial# a,
3 'DB User / OS User : '||s.username||' / '||s.osuser a,
4 'Login Time : '||TO_CHAR(s.logon_time,'mm-dd-yyyy::hh24:mi:ss'),
5 'Date : '||TO_CHAR((TO_DATE('01-JAN-00')+(SYSDATE-logon_time)),'HH24:MI:SS') run_Time,
6 'Module : '||s.module "Module Name" ,
7 'Clients Process : '||s.process ,
8 'Action : '||s.action,
9 'Program : '||s.program,
10 'Clients Machine Name : '||s.machine,
'Terminal : '||P.terminal,
11 12 'last call et : '||s.last_call_et ,
13 'Status : '||s.status
14 from v$session s, v$process p , v$session_wait w
where s.paddr = p.addr and s.sid = w.sid
and s.sid=&sid
15 16 17 order by s.logon_time;
Enter value for sid: 1950
old 16: and s.sid=&sid
new 16: and s.sid=1950
spid, Sid, Serial# : 12619 , 1950,13091
DB User / OS User : XXXXX / oracle
Login Time : 03-07-2018::11:45:12
Date : 09:00:44
Module :
Clients Process : 12619
Action :
Program : oracle@TIG-DB-01 (J000)
Clients Machine Name : TIG-DB-01
Terminal : UNKNOWN
last call et : 637244
Status : ACTIVE
SQL> alter system kill session '1950,13091' immediate;
alter system kill session '1950,13091' immediate
*
ERROR at line 1:
ORA-00031: session marked for kill
SQL> SQL> 2 3 'DB User / OS User : '||s.username||' / '||s.osuser a,
4 'Login Time : '||TO_CHAR(s.logon_time,'mm-dd-yyyy::hh24:mi:ss'),
'Date : '||TO_CHAR((TO_DATE('01-JAN-00')+(SYSDATE-logon_time)),'HH24:MI:SS') run_Time,
5 6 'Module : '||s.module "Module Name" ,
7 'Clients Process : '||s.process ,
8 'Action : '||s.action,
'Program : '||s.program,
9 10 'Clients Machine Name : '||s.machine,
11 'Terminal : '||P.terminal,
'last call et : '||s.last_call_et ,
12 13 'Status : '||s.status
14 from v$session s, v$process p , v$session_wait w
where s.paddr = p.addr and s.sid = w.sid
15 16 and s.sid=&sid
17 order by s.logon_time;
Enter value for sid: 1950
old 16: and s.sid=&sid
new 16: and s.sid=1950
no rows selected