只是一直顯示running,由於超過以往執行時間太多,所以懷疑可能有Lock的現像。
執行下列語法,發現的確有Session互相Lock的情形,而且ctime的數值很高。
select * from v$lock where block >0;
由上列v$lock所提供的SID到v$session去查詢,發現是Concurrect Request卡住。
select * from v$session where sid= &SID ;
執行下列的SQL找到相對應的Request,結果是Planning Manager的Request有問題。
select vs.sid "Session_SID" ,vs.serial# "Session Serial#" ,vp.spid "OS PID" ,fcp.user_concurrent_program_name "Concurrent Name" ,fcr.request_id ,fcr.actual_start_date "Start Time" ,fcr.actual_completion_date "Finish Time" ,(fcr.actual_completion_date-fcr.actual_start_date)*24*60*60 "Expense Time(second)" ,decode(fcr.phase_code,'R','Running','C','Completed', 'P','Pending','I','Inactive') "Request Status" ,decode(fcr.status_code,'A','Waiting','B','Resuming','C','Normal', 'D','Cancelled','E','Error','F','Scheduled', 'G','Warning','H','On Hold','I','Normal','M','No Manager', 'Q','Standby','R','Normal','S','Suspended','T','Terminating', 'U','Disabled','W','Paused','X','Terminated', 'Z','Waiting') "Request Phase" from v$session vs ,v$process vp ,fnd_concurrent_requests fcr ,fnd_concurrent_programs_tl fcp where vs.paddr=vp.addr and vs.process=fcr.os_process_id and fcr.concurrent_program_id=fcp.concurrent_program_id and fcr.phase_code='R' --running and vs.sid = &SID ; --Session SID
因為一直無法將Request成功取消,只好將Session給砍掉。
alter syste kill '&SID,&SERIAL#' ;請同事檢查Planning Manager的狀況,果然在17的下午之後就卡住了。
重新執行MRP,成功。