告警日誌裏這兩天一直顯示這個錯誤:sql
ORA-00600: internal error code, arguments: [kcblasm_1], [103], [], [], [], [], [], []數據庫
Tue Aug 12 09:20:17 CST 2014session
Errors in file /u01/app/oracle/admin/orcl/udump/orcl_ora_29974.trc:oracle
ORA-00600: internal error code, arguments: [kcblasm_1], [103], [], [], [], [], [], []app
Tue Aug 12 09:30:17 CST 2014優化
Errors in file /u01/app/oracle/admin/orcl/udump/orcl_ora_30084.trc:this
ORA-00600: internal error code, arguments: [kcblasm_1], [103], [], [], [], [], [], []3d
Tue Aug 12 09:40:17 CST 2014日誌
Errors in file /u01/app/oracle/admin/orcl/udump/orcl_ora_29919.trc:code
ORA-00600: internal error code, arguments: [kcblasm_1], [103], [], [], [], [], [], []
網上查的解決辦法:
1:臨時的解決方法
若是執行計劃中是hash join形成的,在會話層中設置"_hash_join_enable"=false,如:alter session set "_hash_join_enabled" = false亦可;
若是執行計劃是hash group by 形成的,設置"_gby_hash_aggregation_enabled"=false
2:根本的解決方法
2.1.優化sql語句,避免遇到bug;
2.2.升級
(1)將數據庫升級psu到10.2.0.5.4和11.2能夠修正該問題
(2)對於10.2.0.5.0到10.2.0.5.3的版本,打PATCH 7612454來避免改錯誤(該補丁替換lib中的kcbl.o文件)。
經過臨時解決辦法解決問題示例:
追蹤報警日誌裏提示的trace文件,找到致使出現此錯誤的sql語句
ORA-00600: internal error code, arguments: [kcblasm_1], [103], [], [], [], [], [], []
Current SQL statement for this session:
格式化後的sql語句以下:
SELECT INDENTDATE,
INDENTGROUP,
TRANSDATE,
TRANSBY,
TRANSGROUP,
FEEDBACKBY,
FEEDBACKGROUP,
FINANCEDATE,
FINANCEBY,
FINANCEGROUP,
TOTALCOST,
A.TOTALPAY,
PAY_CASH,
PAY_POINTS,
PAY_ADVANCE1,
PAY_ADVANCE2,
PAY_TYPE,
TRANS_PAY,
DISCOUNT_STAFF,
DISCOUNT_SPECIAL,
GAIN_CASH,
GAIN_POINTS,
GAIN_ADVANCE1,
GAIN_ADVANCE2,
TRANS_CUSTNAME,
TRANS_TEL,
TRANS_PROVINCE,
TRANS_CITY,
TRANS_ADDRESS,
TRANS_ZIPCODE,
TRANS_WEIGHT,
TRANS_COMMENTS,
INDENT_COMMENTS,
INDENT_ID,
A.PARTNER_GUID,
A.PROXY_GUID,
TRANS_TEL2,
CUST_MEDIA_ID,
CUST_PARTNER_GUID,
CUST_PROXY_GUID,
PARTNER_VALUE,
PROXY_VALUE,
CUST_PARTNER_VALUE,
CUST_PROXY_VALUE,
DEALBY,
A.FAILREASON,
ISFOOT,
S_REASONID,
DEALFAILREASON,
A.PRE_FUND,
MEDIA_CALLTYPE,
PRE_ADVANCE,
WEB_FLAG,
NEED_INVOICE,
INVOICE_TITLE,
TRANS_AREA,
ORDERTYPE,
PAY_POINTSPRICE,
A.MEDIA,
USERDEFINEDSTATUS,
CUSTOMERNAME,
CUSTOMERID
FROM ELITE.TABCINDENT A
LEFT JOIN ELITE.OBJECTIVE B
ON A.RELATION_ID = B.OBJECTIVE_GUID
LEFT JOIN ELITE.CUSTOMER C
ON A.CUSTOMER_GUID = C.CUSTOMER_GUID
WHERE (INDENTDATE BETWEEN :1 AND :2 OR B.MODIFIEDDATE BETWEEN :3 AND :4);
將變量:1,:2,:3,:4替換成具體的值執行:
SELECT INDENTDATE,
INDENTGROUP,
TRANSDATE,
TRANSBY,
TRANSGROUP,
FEEDBACKBY,
FEEDBACKGROUP,
FINANCEDATE,
FINANCEBY,
FINANCEGROUP,
TOTALCOST,
A.TOTALPAY,
PAY_CASH,
PAY_POINTS,
PAY_ADVANCE1,
PAY_ADVANCE2,
PAY_TYPE,
TRANS_PAY,
DISCOUNT_STAFF,
DISCOUNT_SPECIAL,
GAIN_CASH,
GAIN_POINTS,
GAIN_ADVANCE1,
GAIN_ADVANCE2,
TRANS_CUSTNAME,
TRANS_TEL,
TRANS_PROVINCE,
TRANS_CITY,
TRANS_ADDRESS,
TRANS_ZIPCODE,
TRANS_WEIGHT,
TRANS_COMMENTS,
INDENT_COMMENTS,
INDENT_ID,
A.PARTNER_GUID,
A.PROXY_GUID,
TRANS_TEL2,
CUST_MEDIA_ID,
CUST_PARTNER_GUID,
CUST_PROXY_GUID,
PARTNER_VALUE,
PROXY_VALUE,
CUST_PARTNER_VALUE,
CUST_PROXY_VALUE,
DEALBY,
A.FAILREASON,
ISFOOT,
S_REASONID,
DEALFAILREASON,
A.PRE_FUND,
MEDIA_CALLTYPE,
PRE_ADVANCE,
WEB_FLAG,
NEED_INVOICE,
INVOICE_TITLE,
TRANS_AREA,
ORDERTYPE,
PAY_POINTSPRICE,
A.MEDIA,
USERDEFINEDSTATUS,
CUSTOMERNAME,
CUSTOMERID
FROM ELITE.TABCINDENT A
LEFT JOIN ELITE.OBJECTIVE B
ON A.RELATION_ID = B.OBJECTIVE_GUID
LEFT JOIN ELITE.CUSTOMER C
ON A.CUSTOMER_GUID = C.CUSTOMER_GUID
WHERE (INDENTDATE BETWEEN '2012-06-19' AND '2012-08-19' OR B.MODIFIEDDATE BETWEEN '2012-06-19' AND '2012-08-1');
執行報錯:
解決辦法:
alter session set "_hash_join_enabled"=false;
alter session set "_gby_hash_aggregation_enabled"=false
--先嚐試一種,若是一種解決了,就不必設置另一種了。
而後再次執行上面的查詢語句,不報錯啦,嘎嘎
成功啦,(*^__^*) 嘻嘻……
讓開發人員在程序里加上這條命令便可。