首页 / 数据库 / MySQL / ORA-01092: ORACLE instance terminated. Disconnection forced问题解决
升级数据字典,解决ORA-01092: Oracle instance terminated. Disconnection forced问题。在Oracle 实例关闭的情况下,Oracle 软件从10.2.0.1 升级到 10.2.0.5 之后,存在的数据库也要升级。此时启动实例会报错 ORA-01092: ORACLE instance terminated. Disconnection forcedSQL> alter database open;ERROR at line 1:ORA-01092: ORACLE instance terminated. Disconnection forced第一步,通过startup upgrade启动实例SQL> startup upgrade;ORACLE instance started.Total System Global Area 322961408 bytesFixed Size 2095992 bytesVariable Size 100664456 bytesDatabase Buffers 213909504 bytesRedo Buffers 6291456 bytesDatabase mounted.Database opened. 第二步,升级数据字典和实例等。SQL>@ORACLE_HOME
dbmsadmincatupgrd.sql整个过程需要15分钟至30分钟左右升级完毕显示如下:Oracle Database 10.2 Upgrade Status Utility 09-11-2014 21:48:21Component Status Version HH:MM:SSOracle Database Server VALID 10.2.0.5.0 00:15:41JServer JAVA Virtual Machine VALID 10.2.0.5.0 00:06:46Oracle XDK VALID 10.2.0.5.0 00:00:51Oracle Database Java Packages VALID 10.2.0.5.0 00:00:45Oracle Text VALID 10.2.0.5.0 00:01:07Oracle XML Database VALID 10.2.0.5.0 00:03:26Oracle Workspace Manager VALID 10.2.0.5.0 00:01:21Oracle Data Mining VALID 10.2.0.5.0 00:00:39OLAP Analytic Workspace VALID 10.2.0.5.0 00:00:48OLAP Catalog VALID 10.2.0.5.0 00:02:01Oracle OLAP API VALID 10.2.0.5.0 00:02:01Oracle interMedia VALID 10.2.0.5.0 00:06:35Spatial VALID 10.2.0.5.0 00:04:50Oracle Expression Filter VALID 10.2.0.5.0 00:00:30Oracle Enterprise Manager VALID 10.2.0.5.0 00:02:59Oracle Rule Manager VALID 10.2.0.5.0 00:00:18.Total Upgrade Time: 00:53:47DOC>#######################################################################DOC>#######################################################################DOC>DOC> The above PL/SQL lists the SERVER components in the upgradedDOC> database, along with their current version and status.DOC>DOC> Please review the status and version columns and look forDOC> any errors in the spool log file. If there are errors in the spoolDOC> file, or any components are not VALID or not the current version,DOC> consult the Oracle Database Upgrade Guide for troubleshootingDOC> recommendations.DOC>DOC> Next shutdown immediate, restart for normal operation, and thenDOC> run utlrp.sql to recompile any invalid application objects.DOC>DOC>#######################################################################DOC>#######################################################################DOC># 第三步,shutdown 实例。Startup实例第四步,再次编译无效的应用对象SQL> @?/rdbms/admin/utlrp.sqlTIMESTAMP--------------------------------------------------------------------------------COMP_TIMESTAMP UTLRP_BGN 2014-09-11 21:52:02DOC> The following PL/SQL block invokes UTL_RECOMP to recompile invalidDOC> objects in the database. Recompilation time is proportional to theDOC> number of invalid objects in the database, so this command may takeDOC> a long time to execute on a database with a large number of invalidDOC> objects.DOC>DOC> Use the following queries to track recompilation progress:DOC>DOC> 1. Query returning the number of invalid objects remaining. ThisDOC> number should decrease with time.DOC> SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);DOC>DOC> 2. Query returning the number of objects compiled so far. This numberDOC> should increase with time.DOC> SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;DOC>DOC> This script automatically chooses serial or parallel recompilationDOC> based on the number of CPUs available (parameter cpu_count) multipliedDOC> by the number of threads per CPU (parameter parallel_threads_per_cpu).DOC> On RAC, this number is added across all RAC nodes.DOC>DOC> UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallelDOC> recompilation. Jobs are created without instance affinity so that theyDOC> can migrate across RAC nodes. Use the following queries to verifyDOC> whether UTL_RECOMP jobs are being created and run correctly:DOC>DOC> 1. Query showing jobs created by UTL_RECOMPDOC> SELECT job_name FROM dba_scheduler_jobsDOC> WHERE job_name like "UTL_RECOMP_SLAVE_%";DOC>DOC> 2. Query showing UTL_RECOMP jobs that are runningDOC> SELECT job_name FROM dba_scheduler_running_jobsDOC> WHERE job_name like "UTL_RECOMP_SLAVE_%";DOC># TIMESTAMP--------------------------------------------------------------------------------COMP_TIMESTAMP UTLRP_END 2014-09-11 21:53:40DOC> The following query reports the number of objects that have compiledDOC> with errors (objects that compile with errors have status set to 3 inDOC> obj$). If the number is higher than expected, please examine the errorDOC> messages reported with each object (using SHOW ERRORS) to see if theyDOC> point to system misconfiguration or resource constraints that must beDOC> fixed before attempting to recompile these objects.DOC># OBJECTS WITH ERRORS------------------- 0DOC> The following query reports the number of errors caught duringDOC> recompilation. If this number is non-zero, please query the errorDOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errorsDOC> are due to misconfiguration or resource constraints that must beDOC> fixed before objects can compile successfully.DOC># ERRORS DURING RECOMPILATION--------------------------- 0SQL>更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12本文永久更新链接地址