背景:migrating a 32 bit database to a 64 bit database
Both databases are 10g
数据库迁移完成后,执行以下语句遇到了error 56319
SQL> alter index index_name rebuild tablespace statsindx2 online;
alter index index_name rebuild tablespace statsindx2 online
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 2
ORA-06553: PLS-801: internal error [56319]
步骤很简单,先把库DOWN掉
1、shutdown immediate
2. Startup upgrade
3、@$ORACLE_HOME/rdbms/admin/utlirp.sql;
4、Shutdown immediate
5、Startup
6、@$ORACLE_HOME/rdbms/admin/utlrp.sql;
7、Shutdown immediate
8、startup
最最主要的就是使用utlirp来把相关内容全部在64位平台下编译一遍,顺便补充下utlirp的作用:
Rem NAME
Rem utlirp.sql - UTiLity script. to Invalidate Pl/sql modules
Rem
Rem DESCRIPTION
Rem This script. can be used to invalidate and all pl/sql modules
Rem (procedures, functions, packages, types, triggers, views)
Rem in a database.
Rem
Rem This script. must be run when it is necessary to regenerate the
Rem compiled code because the PL/SQL code format is inconsistent with
Rem the Oracle executable (e.g., when migrating a 32 bit database to
Rem a 64 bit database or vice-versa).
Rem
Rem Please note that this script. does not recompile invalid objects
Rem automatically. You must restart the database and explicitly invoke
Rem utlrp.sql to recompile invalid objects.
Rem
Rem USAGE
Rem To use this script, execute the following sequence of actions:
Rem 1. Shut down the database and restart in UPGRADE mode
Rem (using STARTUP UPGRADE or ALTER DATABASE OPEN UPGRADE)
Rem 2. Run this script
Rem 3. Shut down the database and restart in normal mode
Rem 4. Run utlrp.sql to recompile invalid objects. This script. does
Rem not automatically recompile invalid objects.
Rem
Rem NOTES
Rem * This script. must be run using SQL*PLUS.
Rem * You must be connected AS SYSDBA to run this script.
Rem * This script. expects the following files to be available in the
Rem current directory:
Rem standard.sql
Rem dbmsstdx.sql
Rem * There should be no other DDL on the database while running the
Rem script. Not following this recommendation may lead to deadlocks.
Rem
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10173379/viewspace-617756/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10173379/viewspace-617756/