ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Solaris裸设备安装三节点RAC102(五)

Solaris裸设备安装三节点RAC102(五)

原创 Linux操作系统 作者:yangtingkun 时间:2011-01-30 23:47:56 0 删除 编辑

利用裸设备安装Solaris上的三节点Oracle 10.2 RAC

这一篇主要介绍RAC环境下安装10204的补丁。

Solaris裸设备安装三节点RAC102(一):http://yangtingkun.itpub.net/post/468/512772

Solaris裸设备安装三节点RAC102(二):http://yangtingkun.itpub.net/post/468/512835

Solaris裸设备安装三节点RAC102(三):http://yangtingkun.itpub.net/post/468/512883

Solaris裸设备安装三节点RAC102(四):http://yangtingkun.itpub.net/post/468/512919

 

 

解压下载的补丁包p6810189_10204_SOLARIS64.zip到指定的目录,并将其解压缩。

在安装补丁之前,首先要关闭所有Oracle的服务。包括数据库、监听、ASM服务、Clusterware服务等。

首先检查数据库状态:

bash-2.03$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on 星期五 5 14 14:46:27 2010

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


连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> set pages 100 lines 120
SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for Solaris: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

SQL> select instance_name, status     
  2  from v$instance;

INSTANCE_NAME    STATUS
---------------- ------------
testrac1         OPEN

SQL> select instance_number, instance_name, status
  2  from gv$instance;

INSTANCE_NUMBER INSTANCE_NAME    STATUS
--------------- ---------------- ------------
              1 testrac1         OPEN
              3 testrac3         OPEN
              2 testrac2         OPEN

下面准备安装补丁,为了方便选择非ROLLING方式安装。另外,对于Oracle10.2.0.4的补丁集,要求CLUSTERWARE的版本必须高于或等于数据库的版本。因此必须先对CLUSTERWARE进行升级,否则无法升级数据库。

确保isqlplus服务和资料管理器都已经关闭。

通过srvctl命令来关闭数据库和监听:

bash-2.03$ srvctl stop db -d testrac
bash-2.03$ srvctl stop listener -n racnode1
bash-2.03$ srvctl stop listener -n racnode2
bash-2.03$ srvctl stop listener -n racnode3

在所有的节点上切换为root用户执行下列操作,关闭Cluster相关进程:

bash-2.03$ su -
Password:
Sun Microsystems Inc.   SunOS 5.8       Generic Patch   October 2001
You have new mail.
# /data/oracle/product/10.2/crs/bin/crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.

利用ps –ef来检查,是否所有的Oracle相关进程都已经关闭。确认后,可以开始安装。

Oracle推荐在安装之前对系统进行备份。这个备份指定是Oracle软件。

下面进入图形界面开始补丁的安装。

# xhost +
access control disabled, clients can connect from any host
# su - oracle
Sun Microsystems Inc.   SunOS 5.8       Generic Patch   October 2001
$ cd /data/patch/Disk1
$ ./runInstaller

点击next,首先需要升级CLUSTERWARE,因此目录选择OraCrs10g_home1目录。

下面是Cluster InstallationLocal Installation的选择,由于只装了RAC环境,这里Oracle自动选择了Cluster,并且无法修改。点击next

出现汇总页面,点击Install开始安装。

安装完成后,使用root用户执行CRS_HOME/install/root102.sh

# /data/oracle/product/10.2/crs/install/root102.sh
Creating pre-patch directory for saving pre-patch clusterware files
Completed patching clusterware files to /data/oracle/product/10.2/crs
Relinking some shared libraries.
ar: writing /data/oracle/product/10.2/crs/lib/libn10.a
ar: writing /data/oracle/product/10.2/crs/lib32/libn10.a
ar: writing /data/oracle/product/10.2/crs/lib/libn10.a
Relinking of patched files is complete.
WARNING: directory '/data/oracle/product/10.2' is not owned by root
WARNING: directory '/data/oracle/product' is not owned by root
WARNING: directory '/data/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.
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: racnode1 racnode1-priv racnode1
Creating OCR keys for user 'root', privgrp 'other'..
Operation successful.
clscfg -upgrade completed successfully

在另外的两个节点上重复刚才的CLUSTERWARE补丁的安装操作。

需要注意,由于执行了前面的root102.sh,使得数据库重新启动,因此需要在安装之前再次关闭数据库和监听:

bash-2.03$ srvctl stop db -d testrac
bash-2.03$ srvctl stop listener -n racnode1
bash-2.03$ srvctl stop listener -n racnode2
bash-2.03$ srvctl stop listener -n racnode3

再次运行runInstaller,这次选择对数据库软件进行升级,因此选择OraDb10g_home1目录。

仍然是Cluster InstallationLocal Installation的选择,这里仍然没有办法修改,点击继续,出现汇总页面,点击Install开始数据库补丁的安装。

安装完成,需要在三个节点分别以root身份执行root.sh

# /data/oracle/product/10.2/database/root.sh
Running Oracle10 root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /data/oracle/product/10.2/database

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 /var/opt/oracle/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.

执行完脚本,点击ok,点击Exit完成patch的安装。

下面可以通过手工运行脚本的方式,也可以选择DBUA来进行数据库的升级。

以前类似的情况都是使用手工方式,手工升级需要修改cluster_database参数,然后单节点启动,执行catupgrd.sql后,再将参数修改回来。这里选择DBUA进行升级。在图形界面直接运行dbua

bash-2.03$ dbua

首先确认升级的数据库TESTRAC,并输入SYS用户的密码。

DBUA会自动收集要升级的数据库的相关信息,随后选择升级后编译失败对象的并行度。

如果没有备份过数据库可以在随后的界面中选择备份的路径。

选择是否设置闪回区,这里不设置闪回。

最后出现汇总信息,确认后开始升级过程。

检查一下V$VERSION视图:

bash-2.03$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on 星期五 5 14 19:39:47 2010

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


连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE    10.2.0.4.0      Production
TNS for Solaris: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production

SQL> select instance_name, status
  2  from gv$instance;

INSTANCE_NAME    STATUS
---------------- ------------
testrac1         OPEN
testrac3         OPEN
testrac2         OPEN

至此,10.2.0.4的补丁已经安装成功。

 

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

请登录后发表评论 登录
全部评论
暂无介绍

注册时间:2007-12-29

  • 博文量
    1954
  • 访问量
    10633372