You're probably right about that condition of outer join and NOT IN:
Code: Select all
008,05-JAN-12 15:22:58.09,DEADLOCK,VSL11,ASHOK,Ashok,RL,30,2553767,277092,Temp S-Lock,
SELECT DM_DMAC_CODE, DM_PARTY, P_NAME, P_CAT, DM_CO, DM_TYPE, DM_DATE,
DM_BP_ID, DM_DP_ID, DM_CL_ID, DM_QTY, DM_SET, DEMAT.ROWID,
DM_MKT_TYPE, DM_DC_NO, DM_CITY, DM_S_DATE, DM_S_NO,
DM_CLEARED, DM_ISIN, DM_CHEQUE, DM_ENTRY_DATE, DM_TO,
CO_NAME, R_RATE
FROM SYSADM.DEMAT, SYSADM.PARTY, SYSADM.SCRIPS, SYSADM.RATES
WHERE DM_PARTY = P_CODE AND DM_CO = CO_CODE AND
R_CO (+) = DM_CO AND R_CITY(+) = DM_CITY AND P_CAT != 'DZ'
AND DM_DATE = :1 AND DM_CITY = :2 AND DM_SET = :3 AND DM_TYPE = 'S' AND DM_CL_ID NOT IN ('10000083' ) AND DM_PARTY IN ( SELECT DPAC_PARTY FROM SYSADM.DPAC WHERE DPAC_POA = 1 ) AND DM_DMAC_CODE = :4
008,05-JAN-12 15:23:10.46,000,05-JAN-12 15:23:43.70,GLOBAL,ABC,8
It gave a deadlock (wonder why!) at 15:22:58 and the last line is the crash at 15:23:10.