oracle oem_monitor,OEM sql monitor 报错java.sql.SQLException: ORA-31011

当尝试使用OEM SQL监视页面时,遇到ORA-31061错误,该错误由于源数据中存在非法字符导致。错误不是持续的,但每天会多次出现。解决方案是应用数据库补丁8246403,或者通过设置事件19119来替换非法字符,例如将非法字符替换为问号。这将允许操作顺利完成而不引发错误。
摘要由CSDN通过智能技术生成

打开OEM -sql 监视页面,出现如下报错:

java.sql.SQLException: ORA-31011: XML 语法分析失败

ORA-19202: XML 处理

LPX-00225: 结束元素标记 "sql" 与起始元素标记 "action" 不匹配

Error at line 46376

时出错

ORA-06512: 在 "SYS.DBMS_SQLTUNE", line 15503

ORA-06512: 在 "SYS.DBMS_SQLTUNE", line 15612

ORA-06512: 在 line 1

截图如下:

d4fbd496defef37e84e826bd9d889913.png

以前一直不知道为啥,今天终于在MOS上找到答案了

c13e6af1585050de14dea6791d9051b5.png

参考文件:

OEM SQL Monitoring Page Throws ORA-31061: XDB error: special char to escaped char conversion failed error (Doc ID 1344065.1)

此情况不是一直存在,但每天有重复出现个几次。

原文内容如下,供参考:

APPLIES TO:

Oracle Database - Enterprise Edition - Version 10.2.0.4 and later

Oracle Purchasing - Version 12.2.4 to 12.2.4 [Release 12.2]

Oracle Database Cloud Schema Service - Version N/A and later

Oracle Database Exadata Cloud Machine - Version N/A and later

Oracle Cloud Infrastructure - Database Service - Version N/A and later

Information in this document applies to any platform.

***** Checked for relevance on 11-Jan-2016 *****

SYMPTOMS

Getting the following error message when trying to use the SQl Monitoring page:

java.sql.SQLException: ORA-31061: XDB error: special char to escaped char conversion failed.

ORA-06512: at "SYS.DBMS_SQLTUNE", line 15487

ORA-06512: at "SYS.DBMS_SQLTUNE", line 15596

ORA-06512: at line 1

The issue is not persistent but re-appaer several times per day.

CAUSE

This error is reported because some illegal character exists in source data.. It is the correct behavior.

Workaround is to remove or replace the illegal character/s. However sometimes it may be hard to find where the illegal character comes from.

Bug 8246403 adds new functionality to replace illegal characters instead of raising ORA-31011 error.

SOLUTION

To fix this problem first apply database Patch 8246403 corresponding to your platform and DB version. If the patch does not exist then contact Oracle Support to request a new patch for your platform and DB version.

Note: If you are on 10.2.0.5 or 11.2 or higher version then you don't need this patch as it is already included in this release.

This Bug:8246403 is an XDB enhancement to add functionality to replace illegal characters instead of raising ORA-31011 error. This enhancement is protected by event 19119 and is disabled by default. This functionality is controlled by setting following levels under event 19119 -

- level 0x100000 : replace illegal character with "?"

- level 0x200000 : replace illegal character with character reference, i.e "%04x;"

- level 0x400000 : remove the illegal character

To enable the event at a particular level perform the below steps -

SQL> ALTER SYSTEM SET EVENTS '19119 trace name context forever, level 0x100000';

or

Activate the event by adding it to the INIT.ORA parameter file -

event="19119 trace name context forever, level 0x100000"

restart the database for the event to take affect.

The above event setting will replace the illegal character with "?" and will allow your operation to complete without error.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值