执行带有代码的预定SAS作业时出现ORA-00600:
BEGIN
MERGE INTO MA_CDM.CI_CONTACT_HISTORY ch USING
(
SELECT
VC.CONTACT_ID,
CASE CNTRL_GRP_FLG
WHEN 1
THEN '_20'
WHEN 0
THEN '_03'
END AS STATUS
FROM
(
SELECT DISTINCT
COMMUNICATION_SK
FROM
SAS_USER.resp_mp_1781661608
)
MPC
INNER JOIN
(
SELECT
CONTACT_ID,
COMMUNICATION_SK,
CNTRL_GRP_FLG
FROM
MA_CDM.V_CONTACT
WHERE
STATUS_CD = 'New'
)
VC
ON
(
MPC.COMMUNICATION_SK = VC.COMMUNICATION_SK
)
)
t ON
(
ch.CONTACT_ID = t.CONTACT_ID
)
WHEN MATCHED THEN
UPDATE
SET
ch.UPDATE_DATE = sysdate,
ch.CONTACT_HISTORY_STATUS_CD = t.STATUS;
MERGE INTO MA_CDM.CI_CONTACT_HISTORY ch USING
(
SELECT DISTINCT
vc.CONTACT_ID,
st.CONTACT_HISTORY_STATUS_CD AS STATUS
FROM
SAS_USER.resp_mp_1781661608 mpc
INNER JOIN MA_CDM.V_CONTACT vc
ON
(
mpc.communication_sk = vc.communication_sk
AND mpc.CLIENT_OW_ID = vc.CLIENT_OW_ID
)
INNER JOIN MA_CDM.CI_CONTACT_HISTORY_STATUS st
ON
trim(UPPER(mpc.EVENT_TYPE)) = trim(UPPER(st.CONTACT_HISTORY_STATUS_DESC))
)
t ON
(
ch.CONTACT_ID = t.CONTACT_ID
)
WHEN MATCHED THEN
UPDATE
SET
ch.UPDATE_DATE = sysdate,
ch.CONTACT_HISTORY_STATUS_CD = t.STATUS;
INSERT
INTO
MA_CDM.CI_RESPONSE_HISTORY rh
(
CELL_PACKAGE_SK ,
TREATMENT_SK ,
TREATMENT_HASH_VAL ,
RESPONSE_SK ,
CLIENT_OW_ID ,
RESPONSE_DTTM ,
RESPONSE_CHANNEL_CD ,
INFERRED_RESPONSE_FLG ,
RESPONSE_VALUE_AMT ,
RESPONSE_DT ,
RESPONSE_TRACKING_CD ,
PROCESSED_DTTM ,
COMMENTS ,
EXPORTED_FLG
)
SELECT
ch.CELL_PACKAGE_SK ,
ch.TREATMENT_SK ,
ch.TREATMENT_HASH_VAL ,
chr.RESPONSE_SK ,
r.CLIENT_OW_ID ,
r.EVENT_DATE ,
chr.RESPONSE_CHANNEL_CD ,
'N' ,
NULL ,
TRUNC(r.EVENT_DATE) ,
ch.RESPONSE_TRACKING_CD ,
sysdate ,
r.EVENT_COMMENT ,
0
FROM
SAS_USER.resp_mp_1781661608 r
INNER JOIN MA_CDM.V_CONTACT ch
ON
(
r.communication_sk = ch.communication_sk
AND r.CLIENT_OW_ID = ch.CLIENT_OW_ID
)
LEFT JOIN MA_CDM.CI_RESPONSE_CHANNEL_RESPONSE chr
ON
(
ch.CHANNEL_CD = chr.RESPONSE_CHANNEL_CD
AND UPPER(chr.RESPONSE_CHANNEL_RESPONSE_CD) = upper(r.EVENT_TYPE)
)
WHERE
upper(trim(r.EVENT_TYPE)) IN ('OPENED', 'CLICKED', 'SHARED',
'CLICKED_PARTNER', 'RATED', 'ACCEPTED', 'DECLINED');
COMMIT;
END;
当我手动执行此块时,我没有错误。
ALERT.LOG:
<msg time='2016-06-01T02:00:16.643+03:00' org_id='oracle' comp_id='rdbms'
msg_id='3550398128' type='INCIDENT_ERROR' group='Generic Internal Error'
level='1' host_id='DB-prod-01' host_addr='127.0.0.1'
prob_key='ORA 600 [kkmupsViewDestFro_4]' upstream_comp='' downstream_comp='SQL_Semantic'
ecid='' errid='61939' detail_path='/data1/app/oracle/diag/rdbms/sasorcl/sasorcl/trace/sasorcl_ora_1311.trc'>
<txt>Errors in file /data1/app/oracle/diag/rdbms/sasorcl/sasorcl/trace/sasorcl_ora_1311.trc (incident=61939):
ORA-00600: internal error code: [kkmupsViewDestFro_4], [24106], [24125], [], [], [], [], [], [], [], [], []
</txt>
</msg>
跟踪文件中的错误:
========== FRAME [33] (opipls()+11038 -> opiosq0()) ==========
defined by frame pointers 0x7fff8ca41210 and 0x7fff8ca40b20
CALL TYPE: call ERROR SIGNALED: no COMPONENT: (null)
数据库版本是11.2.0.1.0。由于空源表(SAS_USER.resp_mp_1781661608),可能会出现此错误。但我无法理解为什么这个代码在手动执行时没有错误。