一個oracle查詢引起的bug
任何軟體都不是完美的,oracle也是如此,隔一段時間就會收到oracle的郵件說建議打哪些安全補丁什麼的。新發布的產品都是release 1,比如10gR1,穩定版本都在10gR2 不要小看著兩個大版本的變化,印象比較深的就是10g 10.2.0.1的安裝包有大概600多M,但是在10.2.0.2.0的補丁包就比安裝包還多,可見在產品線內做了很多的修改,才使得資料庫越來越穩定。
昨天下午在檢查一個問題的時候,發現資料庫日誌報出了ora-600的錯誤,這種症狀不清的錯誤只能求助於metalink了。
錯誤日誌的大體內容如下:
Thu Feb 26 11:06:35 2015
Archived Log entry 60642 added for thread 1 sequence 60576 ID 0xb8c6d509 dest 1:
Thu Feb 26 11:07:20 2015
Errors in file /opt/app/oracle/dbccbspr1/diag/rdbms/cust01/CUST01/trace/CUST01_p019_23657.trc (incident=2100684):
ORA-00600: internal error code, arguments: [srsnext_3], [], [], [], [], [], [], [], [], [], [], []
Incident details in: /opt/app/oracle/dbccbspr1/diag/rdbms/cust01/CUST01/incident/incdir_2100684/CUST01_p019_23657_i2100684.trc
Thu Feb 26 11:07:57 2015
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Thu Feb 26 11:07:58 2015
Errors in file /opt/app/oracle/dbccbspr1/diag/rdbms/cust01/CUST01/trace/CUST01_ora_27252.trc (incident=2119548):
ORA-00600: internal error code, arguments: [srsnext_3], [], [], [], [], [], [], [], [], [], [], []
Incident details in: /opt/app/oracle/dbccbspr1/diag/rdbms/cust01/CUST01/incident/incdir_2119548/CUST01_ora_27252_i2119548.trc
Thu Feb 26 11:07:58 2015
Sweep [inc][2100684]: completed
Sweep [inc][2119548]: completed
Sweep [inc2][2100684]: completed
Thu Feb 26 11:07:58 2015
Dumping diagnostic data in directory=[cdmp_20150226110758], requested by (instance=1, osid=23657 (P019)), summary=[incident=2100684].
檢視trace檔案的內容如下,
發現是一個客戶端程式呼叫的。執行的語句是一個採用了並行,使用分析函式的多表關聯語句。
*** 2015-02-26 11:07:20.965
*** SESSION ID:(4404.677) 2015-02-26 11:07:20.965
*** CLIENT ID:() 2015-02-26 11:07:20.965
*** SERVICE NAME:(CUST01) 2015-02-26 11:07:20.965
*** MODULE NAME:(PL/SQL Developer) 2015-02-26 11:07:20.965
*** ACTION NAME:(SQL Window - select /*+ PARALLEL(csm,4) PARALLEL(crd,4) PARALLEL) 2015-02-26 11:07:20.965
Dump continued from file: /opt/app/oracle/dbccbspr1/diag/rdbms/cust01/CUST01/trace/CUST01_p019_23657.trc
ORA-00600: internal error code, arguments: [srsnext_3], [], [], [], [], [], [], [], [], [], [], []
========= Dump for incident 2100684 (ORA 600 [srsnext_3]) ========
*** 2015-02-26 11:07:20.969
dbkedDefDump(): Starting incident default dumps (flags=0x2, level=3, mask=0x0)
----- Current SQL Statement for this session (sql_id=17a5yw0f09u66) -----
select /*+ PARALLEL(csm,4) PARALLEL(crd,4) PARALLEL(rater,4) */csm.customer_id,csm.ban,csm.coll_status,csm.l9_crd_status,csm.l9_col_status,crd.tot_obligation_pct,rater.tot_obligation_pct,rater.file_id,rater.sys_creation_date,rater.extract_status,rater.waiver_ind,rater.waiver_exp_date
from csm_account csm,
cl9_crd_mntr_fa crd,
(SELECT *
FROM (SELECT cl9_rater_input.*,
ROW_NUMBER () OVER (PARTITION BY account_id ORDER BY sys_creation_date desc,notification_timestamp desc)
AS RANK
FROM cl9_rater_input
)
WHERE RANK = 1) rater
where csm.ban = crd.account_id
and csm.customer_id = crd.customer_id
and csm.l9_crd_status = 'PSUS'
and csm.customer_id = rater.customer_id
and csm.ban = rater.account_id
--and payment.sys_creation_date > rater.sys_creation_date
and crd.tot_obligation_pct != rater.tot_obligation_pct
and rater.tot_obligation_pct < 101
單純來看語句的情況,真是看不出什麼問題,因為這也是客戶端執行的,執行頻率應該很低,而且從語句能夠看出有明顯的修改痕跡,所以就放棄了對這個語句進行進一步調優,直接看看metalink怎麼說。
最後找到一篇相關的文章 Query Fails with ORA-00600: Internal Error Code, Arguments: [srsnext_3] (Doc ID 1589589.1)
這個問題發生的版本是在11.2.0.2,和生產中的問題環境一致。
> sqlplus -v
SQL*Plus: Release 11.2.0.2.0 Production
oracle給出的解答如下:
昨天下午在檢查一個問題的時候,發現資料庫日誌報出了ora-600的錯誤,這種症狀不清的錯誤只能求助於metalink了。
錯誤日誌的大體內容如下:
Thu Feb 26 11:06:35 2015
Archived Log entry 60642 added for thread 1 sequence 60576 ID 0xb8c6d509 dest 1:
Thu Feb 26 11:07:20 2015
Errors in file /opt/app/oracle/dbccbspr1/diag/rdbms/cust01/CUST01/trace/CUST01_p019_23657.trc (incident=2100684):
ORA-00600: internal error code, arguments: [srsnext_3], [], [], [], [], [], [], [], [], [], [], []
Incident details in: /opt/app/oracle/dbccbspr1/diag/rdbms/cust01/CUST01/incident/incdir_2100684/CUST01_p019_23657_i2100684.trc
Thu Feb 26 11:07:57 2015
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
Thu Feb 26 11:07:58 2015
Errors in file /opt/app/oracle/dbccbspr1/diag/rdbms/cust01/CUST01/trace/CUST01_ora_27252.trc (incident=2119548):
ORA-00600: internal error code, arguments: [srsnext_3], [], [], [], [], [], [], [], [], [], [], []
Incident details in: /opt/app/oracle/dbccbspr1/diag/rdbms/cust01/CUST01/incident/incdir_2119548/CUST01_ora_27252_i2119548.trc
Thu Feb 26 11:07:58 2015
Sweep [inc][2100684]: completed
Sweep [inc][2119548]: completed
Sweep [inc2][2100684]: completed
Thu Feb 26 11:07:58 2015
Dumping diagnostic data in directory=[cdmp_20150226110758], requested by (instance=1, osid=23657 (P019)), summary=[incident=2100684].
檢視trace檔案的內容如下,
發現是一個客戶端程式呼叫的。執行的語句是一個採用了並行,使用分析函式的多表關聯語句。
*** 2015-02-26 11:07:20.965
*** SESSION ID:(4404.677) 2015-02-26 11:07:20.965
*** CLIENT ID:() 2015-02-26 11:07:20.965
*** SERVICE NAME:(CUST01) 2015-02-26 11:07:20.965
*** MODULE NAME:(PL/SQL Developer) 2015-02-26 11:07:20.965
*** ACTION NAME:(SQL Window - select /*+ PARALLEL(csm,4) PARALLEL(crd,4) PARALLEL) 2015-02-26 11:07:20.965
Dump continued from file: /opt/app/oracle/dbccbspr1/diag/rdbms/cust01/CUST01/trace/CUST01_p019_23657.trc
ORA-00600: internal error code, arguments: [srsnext_3], [], [], [], [], [], [], [], [], [], [], []
========= Dump for incident 2100684 (ORA 600 [srsnext_3]) ========
*** 2015-02-26 11:07:20.969
dbkedDefDump(): Starting incident default dumps (flags=0x2, level=3, mask=0x0)
----- Current SQL Statement for this session (sql_id=17a5yw0f09u66) -----
select /*+ PARALLEL(csm,4) PARALLEL(crd,4) PARALLEL(rater,4) */csm.customer_id,csm.ban,csm.coll_status,csm.l9_crd_status,csm.l9_col_status,crd.tot_obligation_pct,rater.tot_obligation_pct,rater.file_id,rater.sys_creation_date,rater.extract_status,rater.waiver_ind,rater.waiver_exp_date
from csm_account csm,
cl9_crd_mntr_fa crd,
(SELECT *
FROM (SELECT cl9_rater_input.*,
ROW_NUMBER () OVER (PARTITION BY account_id ORDER BY sys_creation_date desc,notification_timestamp desc)
AS RANK
FROM cl9_rater_input
)
WHERE RANK = 1) rater
where csm.ban = crd.account_id
and csm.customer_id = crd.customer_id
and csm.l9_crd_status = 'PSUS'
and csm.customer_id = rater.customer_id
and csm.ban = rater.account_id
--and payment.sys_creation_date > rater.sys_creation_date
and crd.tot_obligation_pct != rater.tot_obligation_pct
and rater.tot_obligation_pct < 101
單純來看語句的情況,真是看不出什麼問題,因為這也是客戶端執行的,執行頻率應該很低,而且從語句能夠看出有明顯的修改痕跡,所以就放棄了對這個語句進行進一步調優,直接看看metalink怎麼說。
最後找到一篇相關的文章 Query Fails with ORA-00600: Internal Error Code, Arguments: [srsnext_3] (Doc ID 1589589.1)
這個問題發生的版本是在11.2.0.2,和生產中的問題環境一致。
> sqlplus -v
SQL*Plus: Release 11.2.0.2.0 Production
oracle給出的解答如下:
CAUSE
Bug 11852469 : TS11.2.0.3V3 - TRC - SRSNEXT.
Rediscovery information:
If the srsnext_3 internal error is raised and the query involves statistical functions or other aggregates that are treated as distinct aggregates then you may be encountering this problem.
SOLUTION
Apply patch 11852469 if it exists for your version/platform
or
Apply patchset 11.2.0.3 where the fix is included
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8494287/viewspace-1445405/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 查詢引起Oracle阻塞事件的源頭語句的方法Oracle事件
- oracle的一個bugOracle
- Laravel 多條件查詢時粗心導致的一個 BUGLaravel
- 由Oracle Bug引起的AWR Snapshot收集故障Oracle
- oracle 10.2.0.2.0的一個BUGOracle
- 從Oracle 11.2.0.4 BUG到Oracle子查詢展開分析Oracle
- [MySQL] - 聯表查詢,查詢一個不在另一個表的記錄MySql
- oracle 10.2.0.4執行一個樹查詢的問題Oracle
- 一個使用JDBC按Date查詢查詢的問題JDBC
- Oracle關於nvl的一個BugOracle
- Oracle 查詢多個資料Oracle
- static 靜態變數引起 Laravel 中佇列一個 Bug變數Laravel佇列
- ORACLE 鎖表的解決方法及查詢引起鎖表SQL語句[轉]OracleSQL
- ORACLE 鎖表的解決方法及查詢引起鎖表SQL語句方法OracleSQL
- 一個簡單的樹查詢
- Oracle查詢分割槽表的最後一個分割槽值Oracle
- 一個遞迴查詢遞迴
- 記一個全域性變數"冒充"區域性變數引起的bug變數
- 一個oracle bug的簡單驗證Oracle
- oracle sql分頁查詢(一)OracleSQL
- oracle查詢語句查詢增加一列內容Oracle
- [ORACLE BUG]查詢結果錯誤--臨時表並行Oracle並行
- 9i 子查詢bug?
- 查詢Oracle的SCNOracle
- oracle的兩個bugOracle
- 一個MySQL多表查詢的問題MySql
- 一個查詢不走索引的例子索引
- 一個簡單的字串查詢程式字串
- 開源一個通用的查詢框架框架
- 查詢一個表的外來鍵
- 二分查詢 : 那個隱藏了 10 年的 Java BugJava
- Oracle 查詢Oracle
- Oracle中把一個查詢結果插入到一張表中Oracle
- 45 個非常有用的 Oracle 查詢語句Oracle
- 解Bug之路-記一次JVM堆外記憶體洩露Bug的查詢JVM記憶體洩露
- oracle 10gR2 RAC 的一個BUGOracle 10g
- oracle9i replace clob 的一個bugOracle
- Oracle分頁查詢語句(一)Oracle