探索Oracle之数据库升级二11.2.0.3升级到11.2.0.4完整步骤(九)

2015-02-02 23:09:37 · 作者: · 浏览: 91
ove sql script is the final step ofthe upgrade. Please 04:01:54 DOC> review any errors in the spool log file. Ifthere are any errors in 04:01:54 DOC> the spool file, consult the Oracle DatabaseUpgrade Guide for 04:01:54 DOC> troubleshooting recommendations. 04:01:54 DOC> 04:01:54 DOC> Next restart for normal operation, and thenrun utlrp.sql to 04:01:54 DOC> recompile any invalid application objects. 04:01:54 DOC> 04:01:54 DOC> If the source database had an older timezone version prior to 04:01:54 DOC> upgrade, then please run the DBMS_DSTpackage. DBMS_DST will upgrade 04:01:54 DOC> TIMESTAMP WITH TIME ZONE data to use thelatest time zone file shipped 04:01:54 DOC> with Oracle. 04:01:54 DOC> 04:01:54DOC>####################################################################### 04:01:54 DOC>####################################################################### 04:01:54 DOC># 04:01:54 SQL> 04:01:54 SQL> Rem Seterrorlogging off 04:01:54 SQL> SETERRORLOGGING OFF; 04:01:54 SQL> 04:01:54 SQL> REM END OFCATUPGRD.SQL 04:01:54 SQL> 04:01:54 SQL> REM bug12337546 - Exit current sqlplus session at end of catupgrd.sql. 04:01:54 SQL> REM This forces user to start a newsqlplus session in order 04:01:54 SQL> REM to connect to the upgraded db. 04:01:54 SQL> exit Disconnected from OracleDatabase 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP,Data Mining and Real Application Testing options

以上catupgrd.sql脚本运行了50分钟左右,执行完之后会shutdown immediate数据库。这个时候我们将要重启数据库运行utlrp.sql脚本编译失效对象:

12、运行utlrp.sql编译失效对象

[oracle@db01 dbs]$ sqlplus /as sysdba

 

SQL*Plus: Release 11.2.0.4.0Production on Sat Oct 4 04:11:22 2014
Copyright (c) 1982, 2013,Oracle.  All rights reserved.

 
Connected to an idleinstance.

 
SQL> startup

ORACLE instance started.

 
Total System Global Area 2872786944bytes
Fixed Size                  2256712 bytes
Variable Size            2634023096 bytes
Database Buffers          218103808 bytes
Redo Buffers               18403328 bytes
Database mounted.

Database opened.

SQL> @?/rdbms/admin/utlrp

 
TIMESTAMP
--------------------------------------------------------------------------------

COMP_TIMESTAMPUTLRP_BGN  2014-10-04 04:14:57
DOC>   The following PL/SQL block invokesUTL_RECOMP to recompile invalid
DOC>   objects in the database. Recompilation timeis proportional to the
DOC>   number of invalid objects in the database,so this command may take
DOC>   a long time to execute on a database with alarge number of invalid
DOC>   objects.
DOC>
DOC>   Use the following queries to trackrecompilation progress:
DOC>
DOC>   1. Query returning the number of invalidobjects remaining. This
DOC>      number should decrease with time.
DOC>         SELECT COUNT(*) FROM obj$ WHERE statusIN (4, 5, 6);
DOC>
DOC>   2. Query returning the number of objectscompiled so far. This number
DOC>      should increase with time.
DOC>         SELECT COUNT(*) FROMUTL_RECOMP_COMPILED;
DOC>
DOC>   This script automatically chooses serial orparallel recompilation
DOC>   based on the number of CPUs available(parameter cpu_count) multiplied
DOC>   by the number of threads per CPU (parameterparallel_threads_per_cpu).
DOC>   On RAC, this number is added across all RACnodes.
DOC>
DOC>   UTL_RECOMP uses DBMS_SCHEDULER to createjobs for parallel
DOC>   recompilation. Jobs are created withoutinstance affinity so that they
DOC>   can migrate across RAC nodes. Use thefollowing queries to verify
DOC>   whether UTL_RECOMP jobs a