RHEL 7.6 安装oracle database 19c Real Application Cluster Part1: 基础环境配置
RHEL 7.6 安装oracle database 19c Real Application Cluster Part2: Grid Infrastructure配置
RHEL 7.6 安装oracle database 19c Real Application Cluster Part3: ASM磁盘组配置
RHEL 7.6 安装oracle database 19c Real Application Cluster Part4: Database配置
11 RU软件版本
p6880880_121010_Linux-x86-64.zip
p36233126_190000_Linux-x86-64.zip
12 环境变量
#GI
ORACLE_HOME=/app/product/19.3.0/crs
#ORACLE
ORACLE_HOME=/app/oracle/product/19.3.0/dbhome_1
13 RU安装前准备
13.1 升级OPatch工具(两节点)
13.1.1 查询当前OPatch版本信息
#GI
/app/product/19.3.0/crs/OPatch/opatch version
#ORACLE
/app/oracle/product/19.3.0/dbhome_1/OPatch/opatch version
13.1.2 解压OPatch工具
cd /app/media/19.23
unzip p6880880_121010_Linux-x86-64.zip
13.1.3 升级OPatch
#GI
cd /app/product/19.3.0/crs
mv OPatch OPatch.bak
cp -r /app/media/19.23/OPatch /app/product/19.3.0/crs
chown -R grid.oinstall OPatch
#ORACLE
cd /app/oracle/product/19.3.0/dbhome_1
mv OPatch OPatch.bak
cp -r /app/media/19.23/OPatch /app/oracle/product/19.3.0/dbhome_1
chown -R oracle.oinstall OPatch
13.1.4 验证OPatch版本
13.2 验证Oracle inventroy(两节点)
#GI
/app/product/19.3.0/crs/OPatch/opatch lsinventory -detail -oh /app/product/19.3.0/crs
#ORACLE
/app/oracle/product/19.3.0/dbhome_1/OPatch/opatch lsinventory -detail -oh /app/oracle/product/19.3.0/dbhome_1
13.3 解压patch包(两节点)
cd /app/media/19.23
unzip p36233126_190000_Linux-x86-64.zip
chown -R grid.oinstall 36233126
13.4 OPatch冲突检测
#GI
/app/product/19.3.0/crs/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /app/media/19.23/36233126/36233263 /app/product/19.3.0/crs/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /app/media/19.23/36233126/36240578 /app/product/19.3.0/crs/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /app/media/19.23/36233126/36233343 /app/product/19.3.0/crs/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /app/media/19.23/36233126/36460248 /app/product/19.3.0/crs/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /app/media/19.23/36233126/36383196
#ORACLE
/app/oracle/product/19.3.0/dbhome_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /app/media/19.23/36233126/36233263 /app/oracle/product/19.3.0/dbhome_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /app/media/19.23/36233126/36240578
13.1.8 OPatch冲突,回滚冲突的patch
示例:并非36233126出现冲突
Composite Patch : 34386266 Conflict with 19509982 Detail Conflicts/Supersets for each patch are: Sub-Patch : 31550110 Conflict with 19509982 Conflict details: /u01/app/oracle/product/12.1.0/db_1/lib/libserver12.a:qksbg.o /u01/app/oracle/product/12.1.0/db_1/lib/libserver12.a:qksfm.o /u01/app/oracle/product/12.1.0/db_1/lib/libserver12.a:qkscr.o
grid用户执行:/app/product/19.3.0/crs/OPatch/opatchauto rollback /app/media/19.23/36233126 -analyze
13.5 OPatch空间检查(两节点)
#GI
vi /tmp/patch_list_gihome.txt
/app/media/19.23/36233126/36233263 /app/media/19.23/36233126/36240578 /app/media/19.23/36233126/36233343 /app/media/19.23/36233126/36460248 /app/media/19.23/36233126/36383196
grid用户执行:/app/product/19.3.0/crs/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt
#ORACLE
vi /tmp/patch_list_dbhome.txt
/app/media/19.23/36233126/36233263 /app/media/19.23/36233126/36240578
oracle执行:/app/oracle/product/19.3.0/dbhome_1/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_dbhome.txt
14 OPatch安装前检查(两节点)
chown -R grid.oinstall /app/tmp
grid用户执行:cluvfy stage -pre patch
14.1 安装前查看OPatch情况(两节点)
#GI
/app/product/19.3.0/crs/OPatch/opatch lspatches
#ORACLE
/app/oracle/product/19.3.0/dbhome_1/OPatch/opatch lspatches
14.2 oraInventory目录增加组权限(两节点)
chmod 777 /app/oraInventory
停止集群(root执行,两节点) --- 此步无需执行,opatchauto会报错
[root@pri01 ~]# /app/product/19.3.0/crs/bin/crsctl stop crs
/app/product/19.3.0/crs/bin/crsctl stop cluster -all
15 自动安装patch(两节点)
官方文档中明确说明,两节点执行
The utility must be executed by an operating system (OS) user with root
privileges, and it must be executed on each node in the cluster if the Grid home or Oracle RAC database home is in non-shared storage. The utility can be run in parallel on the cluster nodes except for the first (any) node.
#安装过程中注意关闭其他ssh远程连接。
root用户执行以下命令:
cd /app/product/19.3.0/crs/OPatch export PATH=$PATH:/app/product/19.3.0/crs/OPatch
/app/product/19.3.0/crs/OPatch/opatchauto apply /app/media/19.23/36233126
报错后,执行以下命令(两节点)
安装GI时,export PATH=$PATH:/app/product/19.3.0/crs/OPatch
安装DB时,export PATH=$PATH:/app/oracle/product/19.3.0/dbhome_1/OPatch
#To patch only the Grid home:
/app/product/19.3.0/crs/OPatch/opatchauto apply /app/media/19.23/36233126 -oh /app/product/19.3.0/crs/
#To patch one Oracle RAC database homes:
/app/oracle/product/19.3.0/dbhome_1/OPatch/opatchauto apply /app/media/19.23/36233126 -oh /app/oracle/product/19.3.0/dbhome_1
16 验证RU
16.1 验证patch安全性(两节点)
grid用户执行:cluvfy stage -post patch
16.2 安装后查看OPatch情况(两节点)
#GI
/app/product/19.3.0/crs/OPatch/opatch lspatches
#ORACLE
/app/oracle/product/19.3.0/dbhome_1/OPatch/opatch lspatches
16.3 编译无效对象
非CDB/PDB环境
sqlplus / as sysdba
@?/rdbms/admin/utlrp.sql
CDB/PDB环境
/app/oracle/product/19.3.0/dbhome_1/perl/bin/perl /app/oracle/product/19.3.0/dbhome_1/rdbms/admin/catcon.pl -n 1 -e -b utlrp -d /app/oracle/product/19.3.0/dbhome_1/rdbms/admin utlrp.sql
注:由于使用opatchauto,无需执行/app/oracle/product/19.3.0/dbhome_1/OPatch/datapatch -verbose
16.4 验证数据字典
select ACTION_TIME,VERSION,COMMENTS from dba_registry_history;
select patch_id,patch_type,action,status,action_time,description from dba_registry_sqlpatch;
至此19c RAC的RU配置完成