ORA-00600: internal error code, arguments: [kole_t2u], [34], [],

本文解析了Oracle数据库中ORA-600[kole_t2u]错误的原因及三种常见场景,包括无效多字节数据插入CLOB、从VARCHAR2复制到CLOB以及CLOB分割不当等问题,并提供了可能的解决方案。
巡检中,发现有以下告警:
Thu Jun  3 07:37:01 2015
Errors in file /opt/oracle/admin/crmdb/udump/crmdb1_ora_2941248.trc:
ORA-00600: internal error code, arguments: [kole_t2u], [34], [], [], [], [], [], []
Thu Jun  3 07:37:01 2015
Errors in file /opt/oracle/admin/crmdb/udump/crmdb1_ora_2458222.trc:
ORA-00600: internal error code, arguments: [kole_t2u], [34], [], [], [], [], [], []

查阅了下MOS,有可能是某些错误导致,或者是系统的BUG。这里也没说明白,就大致的把文档理解了一些,以下是对MOS文档 ID 734474.1的笔记,希望对该报错的理解有用

Example 1:ORA-600 [kole_t2u], [34] raised in a database with AL32UTF8 character set:

SQL> create table t(a clob);
Table created.

SQL> insert into t values(utl_raw.cast_to_varchar2('EC'));
insert into t values(utl_raw.cast_to_varchar2('EC'))
            *
ERROR at line 1:
ORA-00600: internal error code, arguments: [kole_t2u], [34], [], [], [], [], [], []

什么原因呢?这是由于在AL32UTF8字符集,字符'EC'不代表字符本身的值,而Oracle数据库需要更多的数据字节,因此抛出错误,表示此代码点不完整。

Example 2: ORA-29275 error in a database with a AL32UTF8 character set:
SQL> create table t2(a varchar2(10));
Table created.

SQL> insert into t2 values(utl_raw.cast_to_varchar2('EC'));
1 row created.

SQL> select * from t2;
ERROR:
ORA-29275: partial multibyte character

此过程和上面的差不多,不过这时候使用的是varchar2()类型。注意,在这种情况下,数据被允许存储在数据库中的第一个地方,因为它不通过这种方式插入的检查字符集的规则。与不完全编码点的问题,当被选择的数据只注意到了,然后将引发错误。

什么是不完整的代码点和部分多字节字符?
在多字节字符集,数据库知道有多少字节需要形成一个完整的字符(也叫完整的代码点)。这取决于第一字节的代码点的值,这样数据库就知道需要有多少的字节。如果有剩下的字符串中较少的字节,那么数据库知道有存储格式不正确的代码点,而且可以提高或者ORA-29275或ORA-600[kole_t2u],[34]。

总的来说,会有以下三种情况导致:

Cause type-1: Invalid multibyte data being inserted into a CLOB
这种错误是比较简单的,可以很快就发现,因为他视图提供一个直接结果,而把错误的类型加到CLOB。前面的第一个例子,就是这种类型。
解决方法就是,匹配正确的参数值

Cause type-2: Invalid multibyte data copied from VARCHAR2 into CLOB
这种类型的问题往往看起来像一个BUG,但在实际上涉及到了未完成代码点已经被用在数据库中的事实。上述的例子2展示出了这些数据可能被插入到一个VARCHAR2里。如果该数据随后被转移到一个CLOB列,那么这个错误就会抛出。
检查这种数据的相对简单的方法是从VARCHAR2列,在这种情况下ORA-29275错误可以看出。然而,可能有些数据开始的时候被试图被装入CLOB,而之前在应用程序或在PL / SQL里,那么处理这种就比较复杂。如果该处理会导致不完全的编码点出现那么我们也将看到ORA-600[kole_t2u],[34]。
当然,Oracle也认为有可能是个BUG,如下:
Known related bugs
Bug 4562807 - Fixed in 10.2.0.4 patchset and 11.1 and higher base release.
This bug addresses a ORA-600 [kole_t2u], [34] when using Oracle Text. Before this 'bug' was addressed, this ORA-600 was raised during gisting of a document with invalid multibyte characters. As a result of this fix, rather than raising this ORA-600 and crashing, the gisting of a document with invalid multibyte characters now ends with error 11432: "gisted document contains invalid characters". Individual patches for some platforms are available on top of 10.2.0.2 and 10.2.0.3.
Note therefore that as a final resolution it is still needed to address the fact that these invalid characters are used in the document that is being gisted.
Bug 10334711 - Fixed in 11.2.0.3 patchset and 12.1 base release.
In bug an update statement can encounter ORA-600 [kole_t2u] when database auditing is set to DB_EXTENDED. This feature captures the bind data which is written in a CLOB column of size 4000, and the audited data is cut off at 4000 bytes. Due to this bug, if a multibyte character starts at the 4000th byte, the data gets truncated after the first byte of this character. This leaves an incomplete character, resulting in ORA-600 [kole_t2u]. With the fix the data is truncated before the last incomplete character starts. Individual patches for various platforms and releases exist, and further are available on request

Cause type-3: Incorrect CLOB splits
这种类型的问题是最难查看出,通常在此之前需要大量的调试,才能发现该类型。通常最好要经过已知问题列表和应用任何已知的补丁程序,以排除任何已知的问题。
这种类型的错误的背景来自以下事实CLOB数据有时被分成一定长度的数据的更可管理的块。它这种分裂是一定数量的字节的后制成(例如1000,或4000,等等等等),那么它可能发生的分裂发生在多字节编码点的中间。这随后离开前一个块具有一个不完整的编码点处的数据的末尾,并且可以预期该错误。如果发生这种类型的问题,因此有由于被分裂成块的方式CLOB数据的一个错误。而不是使基于它应始终以饱满的字符做字节的分裂
同上,这也被认为可能是个系统BUG
Known bugs
Bug 10399808 (fixed in 11.2.0.3 and 12.1) & Bug 6407486 (fixed in 10.2.0.5 and 11.2)
When appending data to lob in a loop, incorrect data splits can occur when the internal source buffer does not end on a character boundary. When you are indeed appending data to a lob and hit this error, then these bugs can be suspected. Note that bug 6407486 first attempted to address this issue, but in order to fully resolve this a fix for bug 10399808 is required. This fix is included in the 11.2.0.3 Patchset and in PSUs 11.2.0.2.4 and 11.1.0.7.8 (and higher). Also various one off fixes for this bug are available.
Bug 5017909 - fixed in 10.2.0.4 (and higher 10.2 patchsets) and 11.1 (and higher)
Due to a bug in the "cut" in the data as described above, this bug can cause v$sqlarea.sql_fulltext and v$sql.sql_fulltext to contain sql statements in which invalid multibyte codepoints are used. These can subsequently lead to a variety of issues, like:
SQL Tuning advisor failing with ORA-904, ORA-911 and/or ORA-1740, and ORA-600 [kole_t2u], [34] can be found in the background.
The MMON process periodically running into ORA-600 [kole_t2u], [34] errors
Background processes (like MMON) running into this error when inserting into history tables like wrh$_sqltext
ORA-600 [kole_t2u], [34] errors when using DBMS_STATS.GATHER_FIXED_OBJECTS_STATS
Many of these issues have been individually raised as bugs in the past, but in most cases they go back to the bad data introduced by bug 5017909.
Individual patches for some platforms are available on top of 10.1.0.5, 10.2.0.2 and 10.2.0.3.
Bug 8332730 (also known as duplicate bug 7023252) - fixed in 11.2
This error can be returned when querying the OTHER_XML column of the V$SQL_PLAN view due to this bug.


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30430420/viewspace-1792287/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/30430420/viewspace-1792287/

### ORA-00600错误代码参数为-4019的解决方案 ORA-00600Oracle数据库中的一种内部错误,通常表示数据库遇到了一个不可预期的情况。当参数为`-4019`时,该错误可能与索引块损坏或索引结构不一致相关[^1]。以下是关于ORA-00600 internal error code arguments -4019的具体分析和解决方案: #### 1. 错误原因 ORA-00600 [-4019]通常发生在对索引进行操作时,例如插入、更新或删除数据。这种错误可能是由于以下原因之一引起的: - 索引块损坏。 - 索引结构不一致。 - 数据库文件(如数据文件或重做日志文件)存在物理损坏。 - 使用了隐藏参数或不当的数据库恢复方法。 #### 2. 解决方案 以下是针对ORA-00600 [-4019]的常见解决步骤: ##### 2.1 检查告警日志和跟踪文件 首先需要检查数据库的告警日志和相关的跟踪文件,以获取更多关于错误的详细信息。这些文件通常位于`$ORACLE_BASE/diag/rdbms/<dbname>/<instance>/trace/`目录下。通过分析这些文件,可以确定具体的索引对象及其相关问题[^3]。 ##### 2.2 验证索引完整性 使用`ANALYZE INDEX`命令验证受影响的索引是否存在逻辑损坏: ```sql ANALYZE INDEX <index_name> VALIDATE STRUCTURE; ``` 如果发现索引损坏,可以通过重建索引来修复问题: ```sql ALTER INDEX <index_name> REBUILD; ``` ##### 2.3 检查数据文件一致性 如果索引重建无法解决问题,可能需要进一步检查数据文件的一致性。可以使用`DBVERIFY`工具验证数据文件的物理和逻辑结构: ```bash dbv file=<datafile_path> blocksize=<block_size> ``` ##### 2.4 恢复受影响的对象 如果上述方法无效,可以尝试从备份中恢复受影响的表空间或数据文件。在恢复之前,请确保已启用归档模式并备份了所有必要的归档日志。 ##### 2.5 联系Oracle支持 如果以上方法均无法解决问题,建议收集相关诊断信息(如告警日志、跟踪文件等),并联系Oracle官方支持以获取进一步帮助。 #### 3. 示例代码 以下是一个示例脚本,用于验证和重建索引: ```sql -- 验证索引结构 ANALYZE INDEX my_index VALIDATE STRUCTURE; -- 如果发现损坏,重建索引 ALTER INDEX my_index REBUILD; ``` --- ###
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值