[Err] ORA-00600: 内部错误代码, 参数: [qctcte1], [0], [], [], [], [], [], [], [], [], [], []

今天写程序,后台不报错,页面数据死活显示不出来,把sql语句直接放到数据库运行了一下,报错:[Err] ORA-00600: 内部错误代码, 参数: [qctcte1], [0], [], [], [], [], [], [], [], [], [], []

百度结果:

The information in this article applies to: 
Oracle Server - Enterprise Edition - Version: 9.2.0.3 - 10.2
This problem can occur on any platform.

Errors
ORA 600 "internal error code, arguments: [qctcte1],[0],[%s], [%s], [%s],

Symptoms
ORA-00600 [qctcte1] is encountered while performing a nested select which might include functions like distinct or have an order by clause.


Example:


Sql> CREATE OR REPLACE TYPE int_list IS VARRAY(200) OF INTEGER;

Sql> CREATE TABLE test (id INTEGER);

Sql> SELECT id FROM ( SELECT rp.id FROM (SELECT DISTINCT column_value ID FROM 
TABLE(int_list(1,1,2))) rp, test p WHERE p.id = 1 ORDER BY p.id DESC)


ERROR at line 2:
ORA-00600: internal error code, arguments: [qctcte1], [0], [], [], [], [], [], []



Cause
An inconsistent datatype is reported during typechecking when parsing a query. This is bug 3557906. 
Fix
There are several Workarounds :

1> Remove the desc from the order by clause

Sql > SELECT id FROM ( SELECT rp.id FROM (SELECT DISTINCT column_value ID 
FROM TABLE(int_list(1,1,2))) rp, test p WHERE p.id = 1 ORDER BY p.id )


2> Alter session set "_complex_view_merging"=false;


3> Remove the distinct clause

Sql > SELECT id FROM ( SELECT rp.id FROM (SELECT column_value ID FROM TABLE(int_list 
(1,1,2))) rp, test p WHERE p.id = 1 ORDER BY p.id DESC)

4> Remove the order by clause

Sql > SELECT id FROM ( SELECT rp.id FROM
(SELECT column_value ID FROM TABLE(int_list(1,1,2))) rp, test p WHERE p.id = 1 ) 

5> _pred_move_around = false

This is fixed in 10.2 and will be fixed in the 9206 patchset. 
References
<Bug:3557906> ORA-600: INTERNAL ERROR CODE, ARGUMENTS: [QCTCTE1], [0],

去掉 order by后面的可以了

[SQL]select count(*) from( SELECT -1 METADATA_HISTORY_ID, METADATA_ID, '当前(未发布)' VERSION_NUMBER, RELEASE_DATE, RELEASE_USER, B.CLASS_ID, CLASS_CODE, B.CLASS_NAME, METADATA_CODE, METADATA_NAME FROM MM_METADATA A, MM_CLASS B WHERE A.CLASS_ID = B.CLASS_ID AND A.METADATA_ID = 13 AND A.METADATA_STATUS = 'E' UNION ALL SELECT METADATA_HISTORY_ID, METADATA_ID, VERSION_NUMBER, RELEASE_DATE, RELEASE_USER, B.CLASS_ID, CLASS_CODE, B.CLASS_NAME, METADATA_CODE, METADATA_NAME FROM MM_METADATA_HISTORY A, MM_CLASS B WHERE A.CLASS_ID = B.CLASS_ID AND METADATA_ID = 13 )


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值