文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

oracle 10 rac 升级 10.2.0.1升级到10.2.0.5

2024-04-02 19:55

关注
Oracle? Database 10g Release 2 (10.2.0) RAC for RedHat4
Oracle Rac 10.2.0.1升级至10.2.0.5

升级集群件-滚动升级

升级数据库软件-停用后升级

升级数据库



第一部分:集群件滚动升级$CRS_HOME


1、系统环境


操作系统版本
[root@ordb1 ~]# uname -a
Linux ordb1 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux

CRS版本

[oracle@ordb1 ~]$ crsctl query crs softwareversion
CRS software version on node [ordb1] is [10.2.0.1.0]

[oracle@ordb1 ~]$ crsctl query crs activeversion
CRS active version on the cluster is [10.2.0.1.0]
 
数据库版本:
[oracle@ordb2 ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Mar 15 09:47:45 2011

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> select * from gv$version;

  INST_ID BANNER
---------- ----------------------------------------------------------------
         2 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
         2 PL/SQL Release 10.2.0.1.0 - Production
         2 CORE 10.2.0.1.0      Production
         2 TNS for Linux: Version 10.2.0.1.0 - Production
         2 NLSRTL Version 10.2.0.1.0 - Production
         1 Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
         1 PL/SQL Release 10.2.0.1.0 - Production
         1 CORE 10.2.0.1.0      Production
         1 TNS for Linux: Version 10.2.0.1.0 - Production
         1 NLSRTL Version 10.2.0.1.0 - Production

10 rows selected.

集群状态
[oracle@ordb1 ~]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.orcl.db    application    ONLINE    ONLINE    ordb2      
ora....l1.inst application    ONLINE    ONLINE    ordb1      
ora....l2.inst application    ONLINE    ONLINE    ordb2      
ora....SM1.asm application    ONLINE    ONLINE    ordb1      
ora....B1.lsnr application    ONLINE    ONLINE    ordb1      
ora.ordb1.gsd  application    ONLINE    ONLINE    ordb1      
ora.ordb1.ons  application    ONLINE    ONLINE    ordb1      
ora.ordb1.vip  application    ONLINE    ONLINE    ordb1      
ora....SM2.asm application    ONLINE    ONLINE    ordb2      
ora....B2.lsnr application    ONLINE    ONLINE    ordb2      
ora.ordb2.gsd  application    ONLINE    ONLINE    ordb2      
ora.ordb2.ons  application    ONLINE    ONLINE    ordb2      
ora.ordb2.vip  application    ONLINE    ONLINE    ordb2


关闭节点1
$ emctl stop dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0 
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
http://ordb1:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
 ...  Stopped.


$ isqlplusctl stop
iSQL*Plus 10.2.0.1.0
Copyright (c) 2003, 2005, Oracle.  All rights reserved.
getnameinfo failed
iSQL*Plus instance on port 5560 is not running ...


srvctl stop instance -d orcl -i orcl1
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.orcl.db    application    ONLINE    ONLINE    ordb2      
ora....l1.inst application    OFFLINE   OFFLINE              
ora....l2.inst application    ONLINE    ONLINE    ordb2      
ora....SM1.asm application    ONLINE    ONLINE    ordb1      
ora....B1.lsnr application    ONLINE    ONLINE    ordb1      
ora.ordb1.gsd  application    ONLINE    ONLINE    ordb1      
ora.ordb1.ons  application    ONLINE    ONLINE    ordb1      
ora.ordb1.vip  application    ONLINE    ONLINE    ordb1      
ora....SM2.asm application    ONLINE    ONLINE    ordb2      
ora....B2.lsnr application    ONLINE    ONLINE    ordb2      
ora.ordb2.gsd  application    ONLINE    ONLINE    ordb2      
ora.ordb2.ons  application    ONLINE    ONLINE    ordb2      
ora.ordb2.vip  application    ONLINE    ONLINE    ordb2

srvctl stop asm -n orcl1
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.orcl.db    application    ONLINE    ONLINE    ordb2      
ora....l1.inst application    OFFLINE   OFFLINE              
ora....l2.inst application    ONLINE    ONLINE    ordb2      
ora....SM1.asm application    OFFLINE   OFFLINE              
ora....B1.lsnr application    ONLINE    ONLINE    ordb1      
ora.ordb1.gsd  application    ONLINE    ONLINE    ordb1      
ora.ordb1.ons  application    ONLINE    ONLINE    ordb1      
ora.ordb1.vip  application    ONLINE    ONLINE    ordb1      
ora....SM2.asm application    ONLINE    ONLINE    ordb2      
ora....B2.lsnr application    ONLINE    ONLINE    ordb2      
ora.ordb2.gsd  application    ONLINE    ONLINE    ordb2      
ora.ordb2.ons  application    ONLINE    ONLINE    ordb2      
ora.ordb2.vip  application    ONLINE    ONLINE    ordb2      

srvctl stop nodeapps -n ordb1 
[oracle@ordb1 ~]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.orcl.db    application    ONLINE    ONLINE    ordb2      
ora....l1.inst application    OFFLINE   OFFLINE              
ora....l2.inst application    ONLINE    ONLINE    ordb2      
ora....SM1.asm application    OFFLINE   OFFLINE              
ora....B1.lsnr application    OFFLINE   OFFLINE              
ora.ordb1.gsd  application    OFFLINE   OFFLINE              
ora.ordb1.ons  application    OFFLINE   OFFLINE              
ora.ordb1.vip  application    OFFLINE   OFFLINE              
ora....SM2.asm application    ONLINE    ONLINE    ordb2      
ora....B2.lsnr application    ONLINE    ONLINE    ordb2      
ora.ordb2.gsd  application    ONLINE    ONLINE    ordb2      
ora.ordb2.ons  application    ONLINE    ONLINE    ordb2      
ora.ordb2.vip  application    ONLINE    ONLINE    ordb2

升级节点1 CRS
./ruinstaller
The installer has detected that your Cluster Ready Services (CRS) installation is distributed across the following nodes:

    ordb1
    ordb2

Because the software consists of local identical copies distributed across each of the nodes in the cluster, it is possible to patch your CRS installation in a rolling manner, one node at a time.

To complete the installation of this patchset, you must perform. the following tasks on each node:

    1.    Log in as the root user.
    2.    As the root user, perform. the following tasks:

        a.    Shutdown the CRS daemons by issuing the following command:
                /oracle/product/10.2.0/crs/bin/crsctl stop crs
        b.    Run the shell script. located at:
                /oracle/product/10.2.0/crs/install/root102.sh
            This script. will automatically start the CRS daemons on the
            patched node upon completion.

    3.    After completing this procedure, proceed to the next node and repeat.


[root@ordb2 ~]# /oracle/product/10.2.0/crs/bin/crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
[root@ordb2 ~]# /oracle/product/10.2.0/crs/install/root102.sh
Creating pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to /oracle/product/10.2.0/crs
Relinking some shared libraries.
Relinking of patched files is complete.
WARNING: directory '/oracle/product/10.2.0' is not owned by root
WARNING: directory '/oracle/product' is not owned by root
WARNING: directory '/oracle' is not owned by root
Preparing to recopy patched init and RC scripts.
Recopying init and RC scripts.
Startup will be queued to init within 30 seconds.
/etc/profile: line 55: ulimit: max user processes: cannot modify limit: Operation not permitted
Starting up the CRS daemons.
Waiting for the patched CRS daemons to start.
  This may take a while on some systems.
.
10205 patch successfully applied.
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Successfully deleted 1 values from OCR.
Successfully deleted 1 keys from OCR.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :
node 2: ordb2 ordb2-priv ordb2
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
clscfg -upgrade completed successfully
Creating '/oracle/product/10.2.0/crs/install/paramfile.crs' with data used for CRS configuration
Setting CRS configuration values in /oracle/product/10.2.0/crs/install/paramfile.crs

[oracle@ordb1 ~]$ crsctl query crs softwareversion
CRS software version on node [ordb1] is [10.2.0.5.0]
[oracle@ordb1 ~]$ crsctl query crs activeversion
CRS active version on the cluster is [10.2.0.5.0]


[oracle@ordb2 ~]$ crsctl query crs activeversion
CRS active version on the cluster is [10.2.0.5.0]
[oracle@ordb2 ~]$ crsctl query crs softwareversion
CRS software version on node [ordb2] is [10.2.0.5.0]


第二部分:数据库软件升级
升级前版本:
select comp_name,version,status from dba_registry;
COMP_NAME                      VERSION      STATUS
------------------------------ ------------ ----------------------
Oracle Database Catalog Views  10.2.0.1.0   VALID
Oracle Database Packages and T 10.2.0.1.0   VALID
ypes

Oracle Workspace Manager       10.2.0.1.0   VALID
JServer JAVA Virtual Machine   10.2.0.1.0   VALID
Oracle XDK                     10.2.0.1.0   VALID
Oracle Database Java Packages  10.2.0.1.0   VALID
Oracle Expression Filter       10.2.0.1.0   VALID
Oracle Data Mining             10.2.0.1.0   VALID
Oracle Text                    10.2.0.1.0   VALID

COMP_NAME                      VERSION      STATUS
------------------------------ ------------ ----------------------
Oracle XML Database            10.2.0.1.0   VALID
Oracle Rules Manager           10.2.0.1.0   VALID
Oracle interMedia              10.2.0.1.0   VALID
OLAP Analytic Workspace        10.2.0.1.0   VALID
Oracle OLAP API                10.2.0.1.0   VALID
OLAP Catalog                   10.2.0.1.0   VALID
Spatial                        10.2.0.1.0   VALID
Oracle Enterprise Manager      10.2.0.1.0   VALID
Oracle Real Application Cluste 10.2.0.1.0   VALID

关闭dbconsole,isqlplus,asm,数据库
节点1:

emctl stop dbconsole

isqlplusctl stop

节点2:
emctl stop dbconsole

isqlplusctl stop

节点1:
srvctl stop instance -d orcl -i orcl1
srvctl stop instance -d orcl -i orcl2

srvctl stop asm -n ordb1
srvctl stop asm -n ordb2
srvctl stop nodeapps -n ordb1
srvctl stop nodeapps -n ordb2


升级节点ORACLE软件
./ruinstaller

[root@ordb2 ~]# sh /oracle/product/10.2.0/db_1/root.sh
Running Oracle 10g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /oracle/product/10.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.

srvctl start nodeapps -n ordb1
srvctl start nodeapps -n ordb2

srvctl start asm -n ordb1
srvctl start asm -n ordb2
[oracle@ordb1 ~]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.orcl.db    application    OFFLINE   OFFLINE              
ora....l1.inst application    OFFLINE   OFFLINE              
ora....l2.inst application    OFFLINE   OFFLINE              
ora....SM1.asm application    ONLINE    ONLINE    ordb1      
ora....B1.lsnr application    ONLINE    ONLINE    ordb1      
ora.ordb1.gsd  application    ONLINE    ONLINE    ordb1      
ora.ordb1.ons  application    ONLINE    ONLINE    ordb1      
ora.ordb1.vip  application    ONLINE    ONLINE    ordb1      
ora....SM2.asm application    ONLINE    ONLINE    ordb2      
ora....B2.lsnr application    ONLINE    ONLINE    ordb2      
ora.ordb2.gsd  application    ONLINE    ONLINE    ordb2      
ora.ordb2.ons  application    ONLINE    ONLINE    ordb2      
ora.ordb2.vip  application    ONLINE    ONLINE    ordb2
 


Oracle Database 10.2 Upgrade Status Utility           03-16-2011 09:39:53
.
Component                                Status         Version  HH:MM:SS
Oracle Database Server                    VALID      10.2.0.5.0  00:07:47
JServer JAVA Virtual Machine              VALID      10.2.0.5.0  00:02:19
Oracle XDK                                VALID      10.2.0.5.0  00:00:40
Oracle Database Java Packages           INVALID      10.2.0.5.0  00:00:54
Oracle Text                               VALID      10.2.0.5.0  00:00:33
Oracle XML Database                       VALID      10.2.0.5.0  00:01:35
Oracle Real Application Clusters          VALID      10.2.0.5.0  00:00:02
Oracle Workspace Manager                  VALID      10.2.0.5.0  00:00:04
Oracle Data Mining                        VALID      10.2.0.5.0  00:00:33
OLAP Analytic Workspace                   VALID      10.2.0.5.0  00:00:19
OLAP Catalog                              VALID      10.2.0.5.0  00:00:56
Oracle OLAP API                           VALID      10.2.0.5.0  00:01:45
Oracle interMedia                         VALID      10.2.0.5.0  00:05:34
Oracle Expression Filter                  VALID      10.2.0.5.0  00:00:54
Spatial                                   VALID      10.2.0.5.0  00:00:41
Oracle Rule Manager                       VALID      10.2.0.5.0  00:00:05
Oracle Enterprise Manager                 VALID      10.2.0.5.0  00:00:07
.

Oracle Database 10.2 Upgrade Status Utility           03-16-2011 09:39:53
.
Component                                Status         Version  HH:MM:SS
Oracle Database Server                    VALID      10.2.0.5.0  00:07:47
JServer JAVA Virtual Machine              VALID      10.2.0.5.0  00:02:19
Oracle XDK                                VALID      10.2.0.5.0  00:00:40
Oracle Database Java Packages             VALID      10.2.0.5.0  00:00:54
Oracle Text                               VALID      10.2.0.5.0  00:00:33
Oracle XML Database                       VALID      10.2.0.5.0  00:01:35
Oracle Real Application Clusters          VALID      10.2.0.5.0  00:00:02
Oracle Workspace Manager                  VALID      10.2.0.5.0  00:00:04
Oracle Data Mining                        VALID      10.2.0.5.0  00:00:33
OLAP Analytic Workspace                   VALID      10.2.0.5.0  00:00:19
OLAP Catalog                              VALID      10.2.0.5.0  00:00:56
Oracle OLAP API                           VALID      10.2.0.5.0  00:01:45
Oracle interMedia                         VALID      10.2.0.5.0  00:05:34
Oracle Expression Filter                  VALID      10.2.0.5.0  00:00:54
Spatial                                   VALID      10.2.0.5.0  00:00:41
Oracle Rule Manager                       VALID      10.2.0.5.0  00:00:05
Oracle Enterprise Manager                 VALID      10.2.0.5.0  00:00:07
.
Total Upgrade Time: 00:24:50
DOC>#######################################################################
DOC>#######################################################################
DOC>
DOC>   The above PL/SQL lists the SERVER components in the upgraded
DOC>   database, along with their current version and status.
DOC>
DOC>   Please review the status and version columns and look for
DOC>   any errors in the spool log file.  If there are errors in the spool
DOC>   file, or any components are not VALID or not the current version,
DOC>   consult the Oracle Database Upgrade Guide for troubleshooting
DOC>   recommendations.
DOC>
DOC>   Next shutdown immediate, restart for normal operation, and then
DOC>   run utlrp.sql to recompile any invalid application objects.
DOC>
DOC>#######################################################################
DOC>#######################################################################
DOC>#
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area  167772160 bytes
Fixed Size                  1272600 bytes
Variable Size             155190504 bytes
Database Buffers            8388608 bytes
Redo Buffers                2920448 bytes
Database mounted.
Database opened.

如果升级完成后有无效组件,可以参考以下文档:

metalink 原文:
After upgrade CATPROC and CATALOG comps are INVALID even if only user invalid objects are found [ID 745183.1]


 

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 资料下载
  • 历年真题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     813人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     354人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     318人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     435人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     224人已做
    查看

相关文章

发现更多好内容
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯