OEMsqlmonitor报错java.sql.SQLExceptionORA31011 [数据库教程]
打开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
截图如下:
以前一直不知道为啥,今天终于在MOS上找到答案了
参考文件:
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 "&#x%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.
OEM sql monitor 报错java.sql.SQLException: ORA-31011
以上是 OEMsqlmonitor报错java.sql.SQLExceptionORA31011 [数据库教程] 的全部内容, 来源链接: utcz.com/z/534636.html