---
title: "open database with ORA-00704 and ORA-39700"
author: "MicroJoey"
date: "2011-05-06T16:13:59Z"
tags: ["Oracle", "SQL", "SQL Server"]
categories: ["数据库"]
slug: "open-database-with-ora-00704-and-ora-39700"
draft: false
lastmod: "2011-05-06T16:21:38Z"
id: 1033620
url: "https://microjoey.iteye.com/blog/1033620"
---

1,Error

1)alter.log


```java
Fri May  6 14:50:01 2011
Errors in file /opt/oracle/app/oracle/admin/bks/udump/bks_ora_5111.trc:
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Fri May  6 14:50:01 2011
Error 704 happened during db open, shutting down database
USER: terminating instance due to error 704
Instance terminated by USER, pid = 5111
ORA-1092 signalled during: ALTER DATABASE OPEN...
```


2)/opt/oracle/app/oracle/admin/bks/udump/bks_ora_5111.trc:


```java
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
```


2,Explain

$ oerr ora 00704

> 00704, 00000, "bootstrap process failure"
> // *Cause:  Failure in processing bootstrap data - see accompanying error.
> // *Action: Contact your customer support representative.


$ 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).



3,Cope with it


> 7.Enter the following SQL*Plus commands:
> 
> 
> SQL> STARTUP UPGRADE
> 
> SQL> SPOOL patch.log
> 
> SQL> @?/rdbms/admin/catupgrd.sql
> 
> SQL> SPOOL OFF
> 
> 8.Review the patch.log file for errors and inspect the list of components that is displayed at the end of catupgrd.sql script.
> 
> This list provides the version and status of each SERVER component in the database.
> 
> 9.If necessary, rerun the catupgrd.sql script after correcting any problems.
> 
> 10.Restart the database:
> 
> 
> SQL> SHUTDOWN IMMEDIATE
> 
> SQL> STARTUP
> 
> 11.Run the utlrp.sql script to recompile all invalid PL/SQL packages now instead of when the packages are accessed for the first time. This step is optional but recommended.
> 
> 
> SQL> @?/rdbms/admin/utlrp.sql



4,question


> ERROR at line 1:
> ORA-04045: errors during recompilation/revalidation of SYSMAN.MGMT_JOB_ENGINE
> ORA-04031: unable to allocate 4120 bytes of shared memory ("shared
> pool","select audit$,properties fro...","Typecheck","kgghteInit")
> ORA-06508: PL/SQL: could not find program unit being called:
> "SYSMAN.MGMT_JOB_ENGINE"
> ORA-06512: at line 11


5,cope with
Fri May  6 15:34:11 2011
ALTER SYSTEM SET sga_max_size='6G' SCOPE=SPFILE;
Fri May  6 15:34:26 2011
ALTER SYSTEM SET sga_target='6G' SCOPE=SPFILE;

Redo it!