首页 > 代码库 > Oracle 10g RAC 升级(CPU Update)之--升级CRS

Oracle 10g RAC 升级(CPU Update)之--升级CRS

Oracle 10g RAC 升级(CPU Update)之--升级CRS

系统环境:

操作系统:RedHat EL5

Cluster: Oracle CRS 10.2.0.1.0

Oracle:  Oracle 10.2.0.1.0


如图所示:RAC 系统架构

wKioL1Nwj46BhSceAAGvUOVml00881.jpg

案例:

本案例是从 Oracle 10.2.0.1.0 升级到10.2.0.4.0,作为Oracle的补丁升级(CPU Update)

升级步骤

  1、CRS 升级(对于CRS 升级可以采用滚动升级,本案例采用了滚动升级)

  2、Oracle 软件升级

  3、DataBase 升级(可以采用dbua 或 sqlplus 命令升级)


一、升级CRS (ROLLING UPDATE)

升级前的准备:

[oracle@node1 ~]$ sqlplus ‘/as sysdba‘

SQL*Plus: Release 10.2.0.1.0 - Production on Mon May 12 14:57:24 2014

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 instance_name,status from gv$instance;

INSTANCE_NAME    STATUS

---------------- ------------

prod1            OPEN

prod2            OPEN

SQL> show parameter sga

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

sga_max_size                         big integer 272M

sga_target                           big integer 272M

SQL> alter system set sga_max_size=600m scope=spfile;

System altered.

SQL> alter system set sga_target=600m scope=spfile;

System altered.

SQL> show parameter shared


NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

shared_pool_size                     big integer 0

SQL> alter system set shared_pool_size=200m scope=spfile;

System altered.

SQL> alter system set java_pool_size=300m scope=spfile;

System altered.

SQL> startup force nomount;

ORACLE instance started.

Total System Global Area  629145600 bytes

Fixed Size                  1220988 bytes

Variable Size             524291716 bytes

Database Buffers          100663296 bytes

Redo Buffers                2969600 bytes

SQL> show parameter share

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

shared_pool_size                     big integer 200M

shared_server_sessions               integer

SQL> show parameter java

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

java_pool_size                       big integer 300M

SQL>

1)先在node1上进行升级

在node1上升级CRS:

[root@node1 ~]# uname -a

Linux node1 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:43 EDT 2010 i686 i686 i386 GNU/Linux


[root@node1 ~]# crsctl query crs softwareversion

CRS software version on node [node1] is [10.2.0.1.0]


[root@node1 ~]# crsctl check crs

CSS appears healthy

CRS appears healthy

EVM appears healthy

[root@node1 ~]# crs_stat -t

Name           Type           Target    State     Host        

------------------------------------------------------------

ora....SM1.asm application    ONLINE    ONLINE    node1      

ora....E1.lsnr application    ONLINE    ONLINE    node1      

ora.node1.gsd  application    ONLINE    ONLINE    node1      

ora.node1.ons  application    ONLINE    ONLINE    node1      

ora.node1.vip  application    ONLINE    ONLINE    node1      

ora....SM2.asm application    ONLINE    ONLINE    node2      

ora....E2.lsnr application    ONLINE    ONLINE    node2      

ora.node2.gsd  application    ONLINE    ONLINE    node2      

ora.node2.ons  application    ONLINE    ONLINE    node2      

ora.node2.vip  application    ONLINE    ONLINE    node2      

ora.prod.db    application    ONLINE    ONLINE    node1      

ora....d1.inst application    ONLINE    ONLINE    node1

ora....d2.inst application    ONLINE    ONLINE    node2      

在node1上关闭Instance:

[oracle@node1 ~]$ srvctl stop instance -d prod -i prod1

在node1上关闭ASM:

[oracle@node1 ~]$ srvctl stop asm -n node1

在node1上关闭nodeapps:  

[oracle@node1 ~]$ srvctl stop nodeapps -n node1

[oracle@node1 ~]$ crs_stat -t

Name           Type           Target    State     Host        

------------------------------------------------------------

ora....SM1.asm application    OFFLINE   OFFLINE              

ora....E1.lsnr application    OFFLINE   OFFLINE              

ora.node1.gsd  application    OFFLINE   OFFLINE              

ora.node1.ons  application    OFFLINE   OFFLINE              

ora.node1.vip  application    OFFLINE   OFFLINE              

ora....SM2.asm application    ONLINE    ONLINE    node2      

ora....E2.lsnr application    ONLINE    ONLINE    node2      

ora.node2.gsd  application    ONLINE    ONLINE    node2      

ora.node2.ons  application    ONLINE    ONLINE    node2      

ora.node2.vip  application    ONLINE    ONLINE    node2      

ora.prod.db    application    ONLINE    ONLINE    node1      

ora....d1.inst application    OFFLINE   OFFLINE              

ora....d2.inst application    ONLINE    ONLINE    node2      

[oracle@node1 ~]$


2)下载和解压补丁软件(对于RAC升级CRS和Oracle软件都是用相同的补丁软件)

[oracle@node1 ~]$ unzip p6810189_10204_Linux-x86.zip


升级CRS 10.2.0.1.0 到 10.2.0.4.0,如下图所示:

以Oracle用户的身份执行:runInstaller

wKioL1Nwlo3xPmhLAAQU1tVjSJA972.jpg

开始升级

wKiom1Nwlt7hDZVdAAObDmlNi98525.jpg

注意升级目录:应该是CRS的安装目录

wKioL1NwluvjnYc8AAQ7vvh9PPM217.jpg

升级安装

wKiom1NwmlvDhhu9AARREQYIzdA901.jpg

补丁软件升级过程

wKiom1Nwly2iGxn2AAST5ImyAeQ768.jpg

按照提示执行script


[root@node1 ~]# crsctl stop crs

Stopping resources.

Successfully stopped CRS resources

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

[root@node1 ~]#


[root@node1 ~]# /u01/crs_1/install/root102.sh

Creating pre-patch directory for saving pre-patch clusterware files

Completed patching clusterware files to /u01/crs_1

Relinking some shared libraries.

Relinking of patched files is complete.

WARNING: directory ‘/u01‘ 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.

Starting up the CRS daemons.

Waiting for the patched CRS daemons to start.

 This may take a while on some systems.

.

10204 patch successfully applied.

clscfg: EXISTING configuration version 3 detected.

clscfg: version 3 is 10G Release 2.

Successfully accumulated necessary OCR keys.

Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.

node <nodenumber>: <nodename> <private interconnect name> <hostname>

node 1: node1 node1-priv node1

Creating OCR keys for user ‘root‘, privgrp ‘root‘..

Operation successful.

clscfg -upgrade completed successfully

[root@node1 ~]# crsctl check crs

CSS appears healthy

CRS appears healthy

EVM appears healthy

[root@node1 ~]# crs_stat -t

Name           Type           Target    State     Host        

------------------------------------------------------------

ora....SM1.asm application    ONLINE    ONLINE    node1      

ora....E1.lsnr application    ONLINE    ONLINE    node1      

ora.node1.gsd  application    ONLINE    ONLINE    node1      

ora.node1.ons  application    ONLINE    ONLINE    node1      

ora.node1.vip  application    ONLINE    ONLINE    node1      

ora....SM2.asm application    ONLINE    ONLINE    node2      

ora....E2.lsnr application    ONLINE    ONLINE    node2      

ora.node2.gsd  application    ONLINE    ONLINE    node2      

ora.node2.ons  application    ONLINE    ONLINE    node2      

ora.node2.vip  application    ONLINE    ONLINE    node2      

ora.prod.db    application    ONLINE    ONLINE    node2      

ora....d1.inst application    ONLINE    ONLINE    node1      

ora....d2.inst application    ONLINE    ONLINE    node2      

[oracle@node1 ~]$ crsctl query crs softwareversion

CRS software version on node [node1] is [10.2.0.4.0]

[oracle@node1 ~]$

node1 的CRS升级成功!


3)升级node2的CRS(步骤与node1相同)


[root@node1 ~]# srvctl stop instance -d prod -i prod2

[root@node1 ~]# srvctl stop asm -n node2

[root@node1 ~]# srvctl stop nodeapps -n node2


以下为升级过程过程中与node1不同的画面:

wKiom1NwmfiwXnAnAAU-dtDKH4I497.jpg

选择“select all”

升级软件安装完成后,按照提示执行script

[root@node2 ~]# crsctl stop crs

[root@node2 ~]# /u01/crs_1/install/root102.sh


[root@node2 ~]# crsctl query crs softwareversion

CRS software version on node [node2] is [10.2.0.4.0]

node2的CRS升级完成!

[root@node1 ~]# crs_stat -t

Name           Type           Target    State     Host        

------------------------------------------------------------

ora....SM1.asm application    ONLINE    ONLINE    node1      

ora....E1.lsnr application    ONLINE    ONLINE    node1      

ora.node1.gsd  application    ONLINE    ONLINE    node1      

ora.node1.ons  application    ONLINE    ONLINE    node1      

ora.node1.vip  application    ONLINE    ONLINE    node1      

ora....SM2.asm application    ONLINE    ONLINE    node2      

ora....E2.lsnr application    ONLINE    ONLINE    node2      

ora.node2.gsd  application    ONLINE    ONLINE    node2      

ora.node2.ons  application    ONLINE    ONLINE    node2      

ora.node2.vip  application    ONLINE    ONLINE    node2      

ora.prod.db    application    ONLINE    ONLINE    node2      

ora....d1.inst application    ONLINE    ONLINE    node1      

ora....d2.inst application    ONLINE    ONLINE    node2  



@至此,Oracle RAC CRS 升级成功!






本文出自 “天涯客的blog” 博客,请务必保留此出处http://tiany.blog.51cto.com/513694/1409990