昨天在执行一个存储是遇到了
ORA-06502 和
ORA-06512 错误,初步排查应该是‘
XDB.DBMS_XMLPARSER ’的问题,经过在网上查找前辈们的经验和自己的不懈努力测试,终于找到了解决的办法。
执行的存储和错误系信息如下:
===============================================================
Declare
x XMLPARSER.parser;
Begin
x := xmlparser.newParser;
End;
Error at line 1
ORA-06502: PL/SQL: numeric or value error: raw variable length too long
ORA-06512: at "XDB.DBMS_XMLPARSER", line 63
ORA-06512: at line 4
Script. Terminated on line 1.
x XMLPARSER.parser;
Begin
x := xmlparser.newParser;
End;
Error at line 1
ORA-06502: PL/SQL: numeric or value error: raw variable length too long
ORA-06512: at "XDB.DBMS_XMLPARSER", line 63
ORA-06512: at line 4
Script. Terminated on line 1.
=======================================================
一、卸载XDB,下面是根据MetaLink和找到前辈们的经验整合了一下:
10g - XDB Removal and Reinstall
XDB RemovalThe catnoqm.sql script. drops XDB.
SQL> spool xdb_removal.log
SQL> set echo on;
SQL> connect / as sysdba
SQL> shutdown immediate;
SQL> startup
SQL> @?/rdbms/admin/catnoqm.sql
SQL> drop trigger sys.xdb_installation_trigger;
SQL> drop trigger sys.dropped_xdb_instll_trigger;
SQL> drop table dropped_xdb_instll_tab;
SQL> spool off;
二、安装XDB
XDB Installation
The catqm.sql script. requires the following parameters be passed to it when run:
A. XDB user password
B. XDB user default tablespace
(Any tablespace other than SYSTEM, UNDO and TEMP can be specified.
The specified tablespace must already exist prior to running the script.)
C. XDB user temporary tablespace
Therefore, the syntax to run catqm.sql is the following:
SQL> @?/rdbms/admin/catqm.sql A B C
For example:
SQL> @?/rdbms/admin/catqm.sql XDB XDB TEMP
## IMPORTANT: You must shutdown and restart the database between removal and reinstall ##
SQL> spool xdb_install.log
SQL> set echo on;
SQL> connect / as sysdba
SQL> shutdown immediate;
SQL> startup;
SQL> @?/rdbms/admin/catqm.sql
SQL> @?/rdbms/admin/utlrp.sql
SQL> spool off
The catqm.sql script. requires the following parameters be passed to it when run:
A. XDB user password
B. XDB user default tablespace
(Any tablespace other than SYSTEM, UNDO and TEMP can be specified.
The specified tablespace must already exist prior to running the script.)
C. XDB user temporary tablespace
Therefore, the syntax to run catqm.sql is the following:
SQL> @?/rdbms/admin/catqm.sql A B C
For example:
SQL> @?/rdbms/admin/catqm.sql XDB XDB TEMP
## IMPORTANT: You must shutdown and restart the database between removal and reinstall ##
SQL> spool xdb_install.log
SQL> set echo on;
SQL> connect / as sysdba
SQL> shutdown immediate;
SQL> startup;
SQL> @?/rdbms/admin/catqm.sql
SQL> @?/rdbms/admin/utlrp.sql
SQL> spool off
三、根据上面的方法安装XDB之后仍会出现开始给出的错误:
解决办法:
1、根据第一步卸载XDB;
2、使用DBCA来配置XML DB;
3、完成后测试,没有错误提示。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7922095/viewspace-712942/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7922095/viewspace-712942/