ORA-06553: PLS-801: internal error [56319],64位oracle降级为32位的处理
将64位的的linux系统下的oracle备份集以及spfile以及controlfile的备份文件 恢复到32位的linux系统下,恢复的过程没有报错,但是在
登陆到oracle数据库时,在执行最简单的sql查询的时候报错,
ORA-06553: PLS-801: internal error [56319],执行多个不同的sql反复报这个错误。
解决过程:
参考网页:
http://zhang41082.itpub.net/post/7167/456910
http://hi.baidu.com/rain_at_dna/blog/item/bc0d87178b9546044b90a76b.html
1、修改初始化文件,增加 _SYSTEM_TRIG_ENABLED = false参数
2、Stratup nomount
3、从源库备份一个控制文件,在目标库上重新创建控制文件。
4、Shutdown immediate
5、startup migrate
注:startup migrate表示降级,在9i,无论升级/降级 数据库都是startup migrate,10g后增加了upgrade参数,升级可直接用startup upgrade,降级仍是startup migrate.
6、@$ORACLE_HOME/rdbms/admin/utlirp.sql;
7、Shutdown immediate
8、Startup
9、@$ORACLE_HOME/rdbms/admin/utlrp.sql;
10、Shutdown immediate
11、再次修改初始化参数文件,删除参数 _SYSTEM_TRIG_ENABLED = false
12、Startup
转换完成(当时是照网上一个文档做的,现在仔细看来1、2、3、4、11这些步骤貌似都不需要的,最最主要的就是使用utlirp来把相关内容全部在32位平台下编译一遍),顺便补充下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
将64位的的linux系统下的oracle备份集以及spfile以及controlfile的备份文件 恢复到32位的linux系统下,恢复的过程没有报错,但是在
登陆到oracle数据库时,在执行最简单的sql查询的时候报错,
ORA-06553: PLS-801: internal error [56319],执行多个不同的sql反复报这个错误。
解决过程:
参考网页:
http://zhang41082.itpub.net/post/7167/456910
http://hi.baidu.com/rain_at_dna/blog/item/bc0d87178b9546044b90a76b.html
1、修改初始化文件,增加 _SYSTEM_TRIG_ENABLED = false参数
2、Stratup nomount
3、从源库备份一个控制文件,在目标库上重新创建控制文件。
4、Shutdown immediate
5、startup migrate
注:startup migrate表示降级,在9i,无论升级/降级 数据库都是startup migrate,10g后增加了upgrade参数,升级可直接用startup upgrade,降级仍是startup migrate.
6、@$ORACLE_HOME/rdbms/admin/utlirp.sql;
7、Shutdown immediate
8、Startup
9、@$ORACLE_HOME/rdbms/admin/utlrp.sql;
10、Shutdown immediate
11、再次修改初始化参数文件,删除参数 _SYSTEM_TRIG_ENABLED = false
12、Startup
转换完成(当时是照网上一个文档做的,现在仔细看来1、2、3、4、11这些步骤貌似都不需要的,最最主要的就是使用utlirp来把相关内容全部在32位平台下编译一遍),顺便补充下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