admin 管理员组

文章数量: 1184232


2024年1月16日发(作者:base62解码)

一.准备工作

1. 所需补丁

可以到ORACLE官网上下载11204 for Redhat Linux的补丁,补丁号为8202632,文件名为p13390677_112040_Linux-x86-64_、p13390677_112040_Linux-x86-64_和p13390677_112040_Linux-x86-64_ (包含clusterware和software)。

2. RAC环境

主机名

SID

DB_NAME

当前Oracle版本

操作系统

ORACLE_HOME目录

GRID_HOME目录

节点1 节点2

wzsxdb01

sxapp1

sxapp

11.2.0.1

wzsxdb02

sxapp2

Red Hat Enterprise Linux Server release 5.8 (Tikanga)

/oracle/ora11/oracle/product/11.2.0/dbhome_1

/oracle/ora11/11.2.0/grid

3、备份

备份两实例下的oracle_base ,以便出问题后恢复。

tar zcvf /oracle/ /oracle/ora11

二、GRID升级

1、grid安装预检查

./ stage -pre crsinst -upgrade -n wzsxdb01,wzsxdb02 -rolling -src_crshome

$ORACLE_HOME -dest_crshome /oracle/ora11/11.2.0/grid -dest_version 11.2.0.4.0 -fixup

-fixupdir /tmp -verbose

以下是检查明细:

grid预检查.txt

(1)检查: 用户 "grid" 的等同用户

节点名 状态

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

wzsxdb02 失败

wzsxdb01 失败

结果:PRVF-4007 : 用户 "grid" 的等同用户检查失败

ERROR:

等同用户在所有指定的节点上都不可用

验证无法继续

解决方法:

ssh wzsxdb02 date不成功 ,于是手工重新建立SSH用户等效性配置:

node1:

$ mkdir ~/.ssh

$ chmod 700 ~/.ssh

$ ssh-keygen -t rsa

$ ssh-keygen -t dsa

node2:

$ mkdir ~/.ssh

$ chmod 700 ~/.ssh

$ ssh-keygen -t rsa

$ ssh-keygen -t dsa

node1:

$ cat ~/.ssh/id_ >> ~/.ssh/authorized_keys

$ cat ~/.ssh/id_ >> ~/.ssh/authorized_keys

$ ssh wzsxdb02 cat ~/.ssh/id_ >> ~/.ssh/authorized_keys

$ ssh wzsxdb02 cat ~/.ssh/id_ >> ~/.ssh/authorized_keys

$ scp ~/.ssh/authorized_keys wzsxdb02:~/.ssh/authorized_keys

(2)正在检查主目录 "/oracle/ora11/11.2.0/grid" 中的 Oracle 补丁程序 "9413827 或

9706490"。

节点名 已应用 必需 注释

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

wzsxdb02 缺失 9413827 或 9706490 失败

wzsxdb01 缺失 9413827 或 9706490 失败

结果:主目录 "/oracle/ora11/11.2.0/grid" 中的 Oracle 补丁程序 "9413827 或 9706490" 检

查失败

没有主目录 "/oracle/ora11/11.2.0/grid" 所需的 Oracle 补丁程序。

解决方法:

打补丁9413827。

打补丁前,首先将Opatch升级至最新版。

1) 官网下载最新程序p6880880_112000_。

2) 将解压出来的OPatch文件夹,分别覆盖到GRID_HOME和ORACLE_HOME下(操作前先备份 mv Opatch Opatchbak),注意两个节点都覆盖完成。

3) 验证。

[grid@wzsxdb01 OPatch]$ opatch version

OPatch Version: 11.2.0.3.6

OPatch succeeded.

(3)正在检查文件 "/etc/" 中的 'search' 条目是否在节点间一致...

文件 "/etc/" 中的 'search' 条目在节点间一致

检查无法访问节点的 DNS 响应时间

节点名 状态

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

wzsxdb02 失败

wzsxdb01 失败

PRVF-5636 : 在以下节点上, 无法访问的节点的 DNS 响应时间超过 "15000" 毫秒:

wzsxdb02,wzsxdb01

文件 "/etc/" 在各节点间不一致

解决方法:

1)修改DNS服务器的/etc/文件,添加fil "/dev/null";信息即可。

zone "." IN {

type hint;

// file "";

file "/dev/null";

2)在RAC节点主机分别添加如下参数:

打补丁方法.txt

[root@rac2 ~]# vi /etc/

search

nameserver 192.168.7.51

nameserver 192.168.7.52

options rotate

options timeout:2

options attempts:5

2、GRID Infrastructure升级

预检查全部通过后,开始升级GRID Infrastructure。

Oracle建议使用滚动升级模式,该模式不需要停CRS。

节点1:

Su – grid

Cd /oracle/soft/grid

unset ORACLE_HOME

unset ORACLE_BASE

unset ORACLE_SID

./runInstaller

再运行runInstaller,在出现“指定主目录详细信息”窗口,选择CRS_HOME,其它都点击“下一步”。

注:如果希望安装界面中文,可以手工设置字符集实现(export LANG=zh_CN)。

由于内网升级,因此选择“跳过软件更新”。

选择“升级Oracle Grid Infrastructure或Oracle自动存储管理”。

该环节进行节点选择,点击“SSH连接”,可以进行SSH信任配置,由于双机已配置SSH信任,因此不用执行。

选择ASM对应组,Oracle推荐使用不同组管理,如果有相同组,点击下一步会有警告,可以忽略。

这里指定Grid软件安装位置,我这里选择新建grid2文件夹,原grid不动,安装完成后需要修改GRID环境变量。

再次进行先决条件检查,检查完成后就可以安装了。

安装到最后一步,根据提示信息,用root用户登陆各节点终端,执行指定的root脚本。

节点1:

[root@wzsxdb01 bin]# /oracle/ora11/11.2.0/grid_2/

Performing root user operation for Oracle 11g

The following environment variables are set as:

ORACLE_OWNER= grid

ORACLE_HOME= /oracle/ora11/11.2.0/grid_2

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The contents of "dbhome" have not changed. No need to overwrite.

The contents of "oraenv" have not changed. No need to overwrite.

The contents of "coraenv" have not changed. No need to overwrite.

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 script.

Now product-specific root actions will be performed.

Using configuration parameter file: /oracle/ora11/11.2.0/grid_2/crs/install/crsconfig_params

Creating trace directory

Installing Trace File Analyzer

ASM upgrade has started on first node.

CRS-2791: 正在启动用于关闭 'wzsxdb01' 上 Oracle High Availability Services 管理的资源的操作

CRS-2673: 尝试停止 '' (在 'wzsxdb01' 上)

CRS-2790: 正在启动关闭 'wzsxdb01' 上集群就绪服务管理的资源的操作

CRS-2673: 尝试停止 '' (在 'wzsxdb01' 上)

CRS-2673: 尝试停止 '' (在 'wzsxdb01' 上)

CRS-2673: 尝试停止 '' (在 'wzsxdb01' 上)

CRS-2673: 尝试停止 '' (在 'wzsxdb01' 上)

CRS-2673: 尝试停止 '' (在 'wzsxdb01' 上)

CRS-2677: 成功停止 '' (在 'wzsxdb01' 上)

CRS-2673: 尝试停止 '' (在 'wzsxdb01' 上)

CRS-2677: 成功停止 '' (在 'wzsxdb01' 上)

CRS-2672: 尝试启动 '' (在 'wzsxdb02' 上)

CRS-2677: 成功停止 '' (在 'wzsxdb01' 上)

CRS-2677: 成功停止 '' (在 'wzsxdb01' 上)

CRS-2676: 成功启动 '' (在 'wzsxdb02' 上)

CRS-2677: 成功停止 '' (在 'wzsxdb01' 上)

CRS-2677: 成功停止 '' (在 'wzsxdb01' 上)

CRS-2673: 尝试停止 '' (在 'wzsxdb01' 上)

CRS-2677: 成功停止 '' (在 'wzsxdb01' 上)

CRS-2673: 尝试停止 '' (在 'wzsxdb01' 上)

CRS-2677: 成功停止 '' (在 'wzsxdb01' 上)

CRS-2673: 尝试停止 '' (在 'wzsxdb01' 上)

CRS-2673: 尝试停止 '' (在 'wzsxdb01' 上)

CRS-2677: 成功停止 '' (在 'wzsxdb01' 上)

CRS-2673: 尝试停止 'k' (在 'wzsxdb01' 上)

CRS-2677: 成功停止 'k' (在 'wzsxdb01' 上)

CRS-2677: 成功停止 '' (在 'wzsxdb01' 上)

CRS-2792: 关闭 'wzsxdb01' 上集群就绪服务管理的资源的操作已完成

CRS-2677: 成功停止 '' (在 'wzsxdb01' 上)

CRS-2673: 尝试停止 'nitor' (在 'wzsxdb01' 上)

CRS-2673: 尝试停止 '' (在 'wzsxdb01' 上)

CRS-2673: 尝试停止 '' (在 'wzsxdb01' 上)

CRS-2673: 尝试停止 '' (在 'wzsxdb01' 上)

CRS-2673: 尝试停止 '' (在 'wzsxdb01' 上)

CRS-2673: 尝试停止 '' (在 'wzsxdb01' 上)

CRS-2677: 成功停止 'nitor' (在 'wzsxdb01' 上)

CRS-2677: 成功停止 '' (在 'wzsxdb01' 上)

CRS-2677: 成功停止 '' (在 'wzsxdb01' 上)

CRS-2677: 成功停止 '' (在 'wzsxdb01' 上)

CRS-2677: 成功停止 '' (在 'wzsxdb01' 上)

CRS-2677: 成功停止 '' (在 'wzsxdb01' 上)

CRS-2673: 尝试停止 '' (在 'wzsxdb01' 上)

CRS-2677: 成功停止 '' (在 'wzsxdb01' 上)

CRS-2673: 尝试停止 '' (在 'wzsxdb01' 上)

CRS-2673: 尝试停止 'n' (在 'wzsxdb01' 上)

CRS-2677: 成功停止 '' (在 'wzsxdb01' 上)

CRS-2673: 尝试停止 '' (在 'wzsxdb01' 上)

CRS-2677: 成功停止 'n' (在 'wzsxdb01' 上)

CRS-2677: 成功停止 '' (在 'wzsxdb01' 上)

CRS-2793: 关闭 'wzsxdb01' 上 Oracle High Availability Services 管理的资源的操作已完成

CRS-4133: Oracle High Availability Services has been stopped.

OLR initialization - successful

Replacing Clusterware entries in inittab

clscfg: EXISTING configuration version 5 detected.

clscfg: version 5 is 11g Release 2.

Successfully accumulated necessary OCR keys.

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

Operation successful.

Preparing packages

cvuqdisk-1.0.9-1

Configure Oracle Grid Infrastructure for a Cluster ... succeeded

节点2:

[root@wzsxdb02 bin]# /oracle/ora11/11.2.0/grid_2/

输入结果同节点1。

最后修改两节点对应Grid环境变量为新路径。

3、GRID升级后检查

su - grid

[grid@wzsxdb02 ~]$ crsctl query crs activeversion

Oracle Clusterware active version on the cluster is [11.2.0.4.0]

[grid@wzsxdb02 ~]$ crsctl query crs releaseversion

Oracle High Availability Services release version on the local node is [11.2.0.4.0]

[grid@wzsxdb02 ~]$ crsctl query crs softwareversion

Oracle Clusterware version on node [wzsxdb02] is [11.2.0.4.0]

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Real Application Clusters and Automatic Storage Management options

SQL> select version from v$instance;

VERSION

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

11.2.0.4.0

SQL> exit

三、RDBMS升级

1、数据库软件升级

Su – oracle

[oracle@ wzsxdb01 ~]$ cd /oracle/soft /database/

[oracle@ wzsxdb01 database]$ unset ORACLE_HOME

[oracle@ wzsxdb01 database]$ unset ORACLE_BASE

[oracle@ wzsxdb01 database]$ unset ORACLE_SID

[oracle@ wzsxdb01 database]$./runInstaller

再运行runInstaller进行升级,在出现“指定主目录详细信息”窗口,选择ORACLE_HOME,其它都点击“下一步”。

安装到最后一步,用root用户,在每个节点上执行以下脚本:

节点1:

[root@wzsxdb01 tmp]# /oracle/ora11/oracle/product/11.2.0/db_1/

Performing root user operation for Oracle 11g

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME= /oracle/ora11/oracle/product/11.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The contents of "dbhome" have not changed. No need to overwrite.

The contents of "oraenv" have not changed. No need to overwrite.

The contents of "coraenv" have not changed. No need to overwrite.

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 script.

Now product-specific root actions will be performed.

Finished product-specific root actions.

节点2输出同节点1。

2、数据库升级

使用dbua进行数据库升级

指定需要升级的数据库(图片借用网络)

数据库软件安装完成,数据库升级完成。

3、数据库升级验证

SQL>SELECT COMP_NAME, VERSION, STATUS FROM _REGISTRY;

COMP_NAME VERSION STATUS

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

Oracle Enterprise Manager 11.2.0.4.0 VALID

Oracle Label Security 11.2.0.4.0 VALID

Oracle Text 11.2.0.4.0 VALID

Oracle Workspace Manager 11.2.0.4.0

Oracle Database Catalog Views 11.2.0.4.0

Oracle Database Packages and Types 11.2.0.4.0

Oracle Real Application Clusters 11.2.0.4.0

7 rows selected.

四、升级完成

至此,数据库由11.2.0.1升级至11.2.0.4。

VALID

VALID

VALID

VALID


本文标签: 节点 升级 完成 数据库 用户