ITPub博客

首页 > Linux操作系统 > Linux操作系统 > RAC 数据库升级 10.2.0.1.0 到 10.2.0.2.0 之升级catalog

RAC 数据库升级 10.2.0.1.0 到 10.2.0.2.0 之升级catalog

原创 Linux操作系统 作者:xchui702 时间:2011-08-11 17:05:02 0 删除 编辑

--RAC 数据库由10.2.0.1.0 升级到10.2.0.2.0
安装10.2.0.2.0的介质后,启动数据库报错如下
SYS@devdb11>startup upgrade
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.

Total System Global Area  184549376 bytes
Fixed Size                  1259864 bytes
Variable Size              83887784 bytes
Database Buffers           96468992 bytes
Redo Buffers                2932736 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced

查看alert.log文件:
ORACLE Instance devdb11 - Archival Error. Archiver continuing.
Thu Aug 11 16:47:19 2011
Errors in file /u01/app/oracle/admin/devdb1/udump/devdb11_ora_2177.trc:
ORA-39701: database must be mounted EXCLUSIVE for UPGRADE or DOWNGRADE
Thu Aug 11 16:47:19 2011
Error 39701 happened during db open, shutting down database
USER: terminating instance due to error 39701
Thu Aug 11 16:47:19 2011
Errors in file /u01/app/oracle/admin/devdb1/bdump/devdb11_lms0_1871.trc:
ORA-39701: database must be mounted EXCLUSIVE for UPGRADE or DOWNGRADE
Thu Aug 11 16:47:19 2011
Errors in file /u01/app/oracle/admin/devdb1/bdump/devdb11_lmon_1867.trc:
ORA-39701: database must be mounted EXCLUSIVE for UPGRADE or DOWNGRADE
Thu Aug 11 16:47:19 2011
Errors in file /u01/app/oracle/admin/devdb1/bdump/devdb11_lmd0_1869.trc:
ORA-39701: database must be mounted EXCLUSIVE for UPGRADE or DOWNGRADE
Instance terminated by USER, pid = 2177
ORA-1092 signalled during: ALTER DATABASE OPEN MIGRATE...

--对于RAC数据库需要把cluster_database参数改为false, 因为作为cluster数据库不会用EXCLUSIVE方式打开数据库。
SYS@devdb11>startup nomount;
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.

Total System Global Area  184549376 bytes
Fixed Size                  1259864 bytes
Variable Size              83887784 bytes
Database Buffers           96468992 bytes
Redo Buffers                2932736 bytes
SYS@devdb11>alter system set cluster_database=false scope=spfile;

System altered.

SYS@devdb11>shutdown
ORA-01507: database not mounted


ORACLE instance shut down.
--重新用upgrade方式打开数据库,是成功的。然后升级catalog.
SYS@devdb11>startup upgrade
ORA-32004: obsolete and/or deprecated parameter(s) specified
ORACLE instance started.

Total System Global Area  184549376 bytes
Fixed Size                  1259864 bytes
Variable Size              83887784 bytes
Database Buffers           96468992 bytes
Redo Buffers                2932736 bytes
Database mounted.
Database opened.

SQL> SPOOL patch.log
SQL> @?/rdbms/admin/catupgrd.sql
SQL> SPOOL OFF

--检查patch.log 文件: 发现一下错误都可以忽略
rac1-> grep -i "ora-" patch.log
DOC>    The following statement will cause an "ORA-01722: invalid number"
DOC>    The following statement will cause an "ORA-01722: invalid number"
DOC>   The following statement will cause an "ORA-01722: invalid number"
DOC>    The following statements will cause an "ORA-01722: invalid number"
DOC>    The following statement will cause an "ORA-01722: invalid number"
DOC>    The following PL/SQL block will cause an ORA-20000 error and
DOC>    The following PL/SQL block will cause an ORA-20000 error and
ORA-29558: JAccelerator (NCOMP) not installed. Refer to Install Guide for
ORA-06512: at "SYS.DBMS_JAVA", line 236

以及patch.log文件的末尾各个组件的版本信息。
Component                                Status         Version  HH:MM:SS
Oracle Database Server                    VALID      10.2.0.2.0  00:26:07
JServer JAVA Virtual Machine              VALID      10.2.0.2.0  00:13:47
Oracle XDK                                VALID      10.2.0.2.0  00:02:45
Oracle Database Java Packages             VALID      10.2.0.2.0  00:01:20
Oracle Text                               VALID      10.2.0.2.0  00:01:38
Oracle XML Database                       VALID      10.2.0.2.0  00:01:36
Oracle Real Application Clusters          VALID      10.2.0.2.0  00:00:02
Oracle Data Mining                        VALID      10.2.0.2.0  00:00:38
OLAP Analytic Workspace                   VALID      10.2.0.2.0  00:00:30
OLAP Catalog                              VALID      10.2.0.2.0  00:03:45
Oracle OLAP API                           VALID      10.2.0.2.0  00:03:05
Oracle interMedia                         VALID      10.2.0.2.0  00:15:12
Spatial                                   VALID      10.2.0.2.0  00:01:22
Oracle Expression Filter                  VALID      10.2.0.2.0  00:00:27
Oracle Enterprise Manager                 VALID      10.2.0.2.0  00:03:35
Oracle Rule Manager                       VALID      10.2.0.2.0  00:00:44
.

--重启动后,编译失效的对象。
SYS@devdb11>select distinct status from dba_objects;

STATUS
-------
INVALID
VALID

SYS@devdb11>select status, count(*) from dba_objects group by status;

STATUS    COUNT(*)
------- ----------
INVALID        493
VALID        49796

SYS@devdb11>@?/rdbms/admin/utlrp.sql

TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN  2011-08-12 10:27:03

DOC>   The following PL/SQL block invokes UTL_RECOMP to recompile invalid
DOC>   objects in the database. Recompilation time is 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 a large number of invalid
DOC>   objects.
DOC>
DOC>   Use the following queries to track recompilation progress:
DOC>
DOC>   1. Query returning the number of invalid objects remaining. This
DOC>      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 number
DOC>      should increase with time.
DOC>         SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
DOC>
DOC>   This script. automatically chooses serial or parallel recompilation
DOC>   based on the number of CPUs available (parameter cpu_count) multiplied
DOC>   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 parallel
DOC>   recompilation. Jobs are created without instance affinity so that they
DOC>   can migrate across RAC nodes. Use the following queries to verify
DOC>   whether UTL_RECOMP jobs are being created and run correctly:
DOC>
DOC>   1. Query showing jobs created by UTL_RECOMP
DOC>         SELECT job_name FROM dba_scheduler_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>
DOC>   2. Query showing UTL_RECOMP jobs that are running
DOC>         SELECT job_name FROM dba_scheduler_running_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>#

PL/SQL procedure successfully completed.


TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_END  2011-08-12 10:30:27


PL/SQL procedure successfully completed.

DOC> The following query reports the number of objects that have compiled
DOC> with errors (objects that compile with errors have status set to 3 in
DOC> obj$). If the number is higher than expected, please examine the error
DOC> messages reported with each object (using SHOW ERRORS) to see if they
DOC> point to system misconfiguration or resource constraints that must be
DOC> fixed before attempting to recompile these objects.
DOC>#

OBJECTS WITH ERRORS
-------------------
                  0

DOC> The following query reports the number of errors caught during
DOC> recompilation. If this number is non-zero, please query the error
DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC> are due to misconfiguration or resource constraints that must be
DOC> fixed before objects can compile successfully.
DOC>#

ERRORS DURING RECOMPILATION
---------------------------
                          0


PL/SQL procedure successfully completed.

SYS@devdb11>select status, count(*) from dba_objects group by status;

STATUS    COUNT(*)
------- ----------
VALID        50290


--对于cluster 数据库,

SYS@devdb11>alter system set cluster_database=true scope=spfile;

System altered.

SYS@devdb11>shutdown
ORA-01507: database not mounted

--启动数据库
srvctl start database -d devdb1

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/674865/viewspace-704721/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-05-16

  • 博文量
    38
  • 访问量
    117765