且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ORA-00704、ORA-39700处理

更新时间:2022-08-22 16:31:28


文章版权所有Jusin Haoluckyfriends),支持原创,转载请注明。

原来的数据库11.2.0.1,现在安装的是11.2.0.3
SQL> alter database open;
alter database open
*
第 1 行出现错误:
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
进程 ID: 292
会话 ID: 191 序列号: 1


SQL> !oerr ora 39700
39700, 00000, "database must be opened with UPGRADE option"
// *Cause:  A normal database open was attempted, but the database has not
//          been upgraded to the current server version.
// *Action: Use the UPGRADE option when opening the database to run
//          catupgrd.sql (for database upgrade), or to run catalog.sql
//          and catproc.sql (after initial database creation).
    说明需要运行这些数据字典脚本,主要原因是升级以后数据字典的一些基表的内容修改了

C:\>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on 星期四 11月 28 16:06:03 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

已连接到空闲例程。

SQL> startup upgrade
ORACLE 例程已经启动。

Total System Global Area  860160000 bytes
Fixed Size                  2260040 bytes
Variable Size             234881976 bytes
Database Buffers          616562688 bytes
Redo Buffers                6455296 bytes
数据库装载完毕。
数据库已经打开。
SQL>
方法1:
-- CATalog UPGraDe to the new release:
This script is to be used for upgrading an 8.1.7, 9.0.1, 9.2 or 10.1 database to the new release.  This script provides a direct upgrade path from these releases to the new Oracle release.
SQL>@?/rdbms/admin/catupgrd.sql

---Creates data dictionary views.重新编译一下一些无效的对象
SQL>@?/rdbms/admin/utlrp.sql

方法2:
--Creates data dictionary views.
SQL>@?/rdbms/admin/catalog.sql
----Creates data dictionary views for types, stored procedures,
SQL>@?/rdbms/admin/catproc.sql

SQL>shutdown immediate
SQL>startup