10g RAC下安装10.2.0.4补丁

1.检查目前补丁的状态:

SQL> select version from v$timezone_file;

   VERSION
----------
         2
2.检查oracle_home和oracle_sid的环境变量:

rac1-> more .bash_profile
export PATH
unset USERNAME

export PS1="`/bin/hostname -s`-> "
export EDITOR=vi
export ORACLE_SID=orcl1
export ORACLE_BASE=/u01/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:$PATH
umask 022

已经设置,可以考虑不必设置。

3.停止所有的服务

$ emctl stop dbconsole
$ isqlplusctl stop
$ lsnrctl stop

1.首先升级CRS

1.每节点都需要在root用户下运行:

 #u01/oracle/product/10.2.0/crs_1/bin/crsctl stop crs

Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.

备注:如果上面步骤没做,运行下面命令会出现如下报错

[root@rac2 oracle]# /u01/oracle/product/10.2.0/crs_1/install/root102.sh
Please shut down the following processes before running this script.
20629 ?        00:00:59 ocssd.bin
14155 ?        00:01:18 crsd.bin
20426 ?        00:00:23 evmd.bin

查询每个节点状态:

rac1-> crs_stat -t
CRS-0184: Cannot communicate with the CRS daemon.

rac2-> CRS-0184: Cannot communicate with the CRS daemon.
bash: CRS-0184:: command not found

2.每个节点都需要在root用户下运行:

[root@rac1 oracle]# /u01/oracle/product/10.2.0/crs_1/install/root102.sh
Creating pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to /u01/oracle/product/10.2.0/crs_1
Relinking some shared libraries.
Relinking of patched files is complete.
WARNING: directory '/u01/oracle/product/10.2.0' is not owned by root
WARNING: directory '/u01/oracle/product' is not owned by root
WARNING: directory '/u01/oracle' is not owned by root
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 :
node 1: rac1 rac1-priv rac1
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
clscfg -upgrade completed successfully

备注:安装文档的说明,在一个节点执行完毕之后,才能执行另外一个节点。

[root@rac2 oracle]#  /u01/oracle/product/10.2.0/crs_1/install/root102.sh
Creating pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to /u01/oracle/product/10.2.0/crs_1
Relinking some shared libraries.
Relinking of patched files is complete.
WARNING: directory '/u01/oracle/product/10.2.0' is not owned by root
WARNING: directory '/u01/oracle/product' is not owned by root
WARNING: directory '/u01/oracle' is not owned by root
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 :
node 2: rac2 rac2-priv rac2
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
clscfg -upgrade completed successfully

然后开始升级DB 。升级DB前要使用“/u01/oracle/product/10.2.0/crs_1/bin/crsctl stop crs”关闭CRS进程,否则升级DB出错。

注意对两个节点分别都需要运行./runinstaller,升级CRS.

最后要在每个节点执行root.sh脚本。


[root@rac1 ~]#  /u01/oracle/product/10.2.0/db_1/root.sh
Running Oracle10 root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/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.


[root@rac2 ~]#  /u01/oracle/product/10.2.0/db_1/root.sh
Running Oracle10 root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/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.

最后一步:升级监听程序:

使用dbua对监听升级后,升级完毕。


 rac1-> sqlplus /nolog

SQL*Plus: Release 10.2.0.4.0 - Production on Sun Aug 3 01:32:47 2008

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

SQL> conn sys/oracle as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area  209715200 bytes
Fixed Size                  1266632 bytes
Variable Size             104860728 bytes
Database Buffers          100663296 bytes
Redo Buffers                2924544 bytes
Database mounted.

讨论:如果针对在AIX环境下的RAC,是否是把HACMP停掉打补丁会更安全?

 




 




 

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

转载于:http://blog.itpub.net/8334342/viewspace-417564/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值