目录
[1. 当前环境](#1. 当前环境)
[2. 下载Oracle AI Database 26ai 26.3 gold image](#2. 下载Oracle AI Database 26ai 26.3 gold image)
[3. 给gi 安装 26.3](#3. 给gi 安装 26.3)
[3.1 在两个节点上建立新ORACLE_HOME 目录](#3.1 在两个节点上建立新ORACLE_HOME 目录)
[3.2 使用Oracle FPP Local Mode 部署](#3.2 使用Oracle FPP Local Mode 部署)
[3.3 试切换到新目录](#3.3 试切换到新目录)
[3.4 正式切换到新目录](#3.4 正式切换到新目录)
[3.5 验证](#3.5 验证)
[4. 给数据库安装 26.3](#4. 给数据库安装 26.3)
[4.1 在两个节点建立数据库的新ORACLE HOME目录](#4.1 在两个节点建立数据库的新ORACLE HOME目录)
[4.2 部署ORACLE HOME到新位置](#4.2 部署ORACLE HOME到新位置)
[4.3 试切换到新目录](#4.3 试切换到新目录)
[4.4 正式切换到新目录](#4.4 正式切换到新目录)
[4.5 启用补丁](#4.5 启用补丁)
[4.6 验证数据库补丁](#4.6 验证数据库补丁)
不知大家注意没有,以前打补丁,比较麻烦,要停机很久,在原地打补丁,风险比较高,ORACLE 从26AI开始,每个季度RU补丁,在原来补丁形式的基础上,还提供了一个GOLD IMAGE 介质,可以不停机先直接在非原地安装好新版本,再切换到新版本路径,中间都不需要手工停止数据库,起到非常短时间影响使用。下面我们以安装ru 26.3 为例看看如何来实现。
1. 当前环境
ORACLE LINUX 10.2
ORACLE AI DATABASE 26ai 23.26.2 rac 2节点
用户:grid,oracle
安装位置:
26.2 位置:
grid_home=/u01/app/26.2.0/grid
oracle_home=/u01/app/oracle/product/26.2.0/dbhome_1
26.3 位置
grid_home=/u01/app/26.3/grid
oracle_home=/u01/app/oracle/product/26.3/dbhome_1
2. 下载Oracle AI Database 26ai 26.3 gold image
文件具体位置可以参见mos 文章 Primary Note for Database Quarterly Release Updates -KB106822
找到 Database 26ai 部分
这里,我们下载 database 和gi 的gold image 即可。
介质只需要上传到 oracle 26ai rac 安装环境其中一台机器中去。
我这里放在 /u01/setup/{grid,db} 下面
root@rac01 setup# tree /u01/setup/
/u01/setup/
├── db
│ ├── gold_image.zip
│ └── LINUX.X64_2326100_db_home.zip
└── grid
├── gold_image.zip
└── LINUX.X64_2326100_grid_home.zip
3 directories, 4 files
3. 给gi 安装 26.3
3.1 在两个节点上建立新ORACLE_HOME 目录
mkdir /u01/app/26.3/grid -p
chown -R root:oinstall /u01/app/26.3/grid
3.2 使用Oracle FPP Local Mode 部署
只在一个节点执行即可,我们这里使用 一号机 rac01来执行
使用grid用户来执行
root@rac01 \~# su - grid
Last login: Tue May 5 21:49:26 CST 2026
grid@rac01 \~$
grid@rac01 \~$ rhpctl deploy home -path /u01/app/26.3/grid -zip /u01/setup/grid/p39581618_230000_Linux-x86-64.zip
具体过程见下面
grid@rac01 \~$ rhpctl deploy home -path /u01/app/26.3/grid -zip /u01/setup/grid/p39581618_230000_Linux-x86-64.zip
rac01: Storing metadata in repository for working copy "DEST_HOME_PATH_WC1601013430" ...
rac01: Changing the home ownership to user grid:...
rac01: Changing the home ownership to user grid:...
rac01: Extracting files to directory /u01/app/26.3/grid...
rac01: Files successfully extracted
rac01: Copying home contents...
rac01: Changing the home ownership to user grid...
rac01: Provisioning Oracle home...
rac01: Changing the home ownership to user grid and group oinstall...
rac01: Starting clone operation...
rac01: CRS-5051: Executing script Root
rac01: CRS-5051: Executing script Root
rac01: Launching Oracle Grid Infrastructure Setup Wizard...
rac01: Launching Oracle Grid Infrastructure Setup Wizard...
rac01: *********************************************
Physical Memory: This is a prerequisite condition to test whether the system has at least 8GB (8388608.0KB) of total physical memory.
Severity: IGNORABLE
Overall status: VERIFICATION_FAILED
Error message: PRVF-7530 : Sufficient physical memory is not available on node "rac02" Required physical memory = 8GB (8388608.0KB)
Cause: Amount of physical memory (RAM) found does not meet minimum memory requirements.
Action: Add physical memory (RAM) to the node specified.
WARNING INS-13014 Target environment does not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details. /u01/app/oraInventory/logs/GridSetupActions2026-08-29_10-39-26AM/gridSetupActions2026-08-29_10-39-26AM.log.
rac01: *********************************************
Physical Memory: This is a prerequisite condition to test whether the system has at least 8GB (8388608.0KB) of total physical memory.
Severity: IGNORABLE
Overall status: VERIFICATION_FAILED
Error message: PRVF-7530 : Sufficient physical memory is not available on node "rac01" Required physical memory = 8GB (8388608.0KB)
Cause: Amount of physical memory (RAM) found does not meet minimum memory requirements.
Action: Add physical memory (RAM) to the node specified.
WARNING INS-13014 Target environment does not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details. /u01/app/oraInventory/logs/GridSetupActions2026-08-29_10-39-26AM/gridSetupActions2026-08-29_10-39-26AM.log.
rac01: ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oraInventory/logs/GridSetupActions2026-08-29_10-39-26AM/gridSetupActions2026-08-29_10-39-26AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
/u01/app/26.3/grid/install/response/grid_2026-08-29_10-39-26AM.rsp
rac01: ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oraInventory/logs/GridSetupActions2026-08-29_10-39-26AM/gridSetupActions2026-08-29_10-39-26AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
/u01/app/26.3/grid/install/response/grid_2026-08-29_10-39-26AM.rsp
rac01: You can find the log of this install session at:
/u01/app/oraInventory/logs/GridSetupActions2026-08-29_10-39-26AM/gridSetupActions2026-08-29_10-39-26AM.log
rac01: You can find the log of this install session at:
/u01/app/oraInventory/logs/GridSetupActions2026-08-29_10-39-26AM/gridSetupActions2026-08-29_10-39-26AM.log
rac01:
As a root user, run the following script(s):
- /u01/app/26.3/grid/root.sh
Run /u01/app/26.3/grid/root.sh on the following nodes:
rac02
Successfully Setup Software with warning(s).
rac01: Launching Oracle Grid Infrastructure Setup Wizard...
*********************************************
Physical Memory: This is a prerequisite condition to test whether the system has at least 8GB (8388608.0KB) of total physical memory.
Severity: IGNORABLE
Overall status: VERIFICATION_FAILED
Error message: PRVF-7530 : Sufficient physical memory is not available on node "rac02" Required physical memory = 8GB (8388608.0KB)
Cause: Amount of physical memory (RAM) found does not meet minimum memory requirements.
Action: Add physical memory (RAM) to the node specified.
WARNING INS-13014 Target environment does not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details. /u01/app/oraInventory/logs/GridSetupActions2026-08-29_10-39-26AM/gridSetupActions2026-08-29_10-39-26AM.log.
ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oraInventory/logs/GridSetupActions2026-08-29_10-39-26AM/gridSetupActions2026-08-29_10-39-26AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
/u01/app/26.3/grid/install/response/grid_2026-08-29_10-39-26AM.rsp
You can find the log of this install session at:
/u01/app/oraInventory/logs/GridSetupActions2026-08-29_10-39-26AM/gridSetupActions2026-08-29_10-39-26AM.log
As a root user, run the following script(s):
- /u01/app/26.3/grid/root.sh
Run /u01/app/26.3/grid/root.sh on the following nodes:
rac02
Successfully Setup Software with warning(s).
rac01:
As a root user, run the following script(s):
- /u01/app/26.3/grid/root.sh
Run /u01/app/26.3/grid/root.sh on the following nodes:
rac01
Successfully Setup Software with warning(s).
rac01: Launching Oracle Grid Infrastructure Setup Wizard...
*********************************************
Physical Memory: This is a prerequisite condition to test whether the system has at least 8GB (8388608.0KB) of total physical memory.
Severity: IGNORABLE
Overall status: VERIFICATION_FAILED
Error message: PRVF-7530 : Sufficient physical memory is not available on node "rac01" Required physical memory = 8GB (8388608.0KB)
Cause: Amount of physical memory (RAM) found does not meet minimum memory requirements.
Action: Add physical memory (RAM) to the node specified.
WARNING INS-13014 Target environment does not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details. /u01/app/oraInventory/logs/GridSetupActions2026-08-29_10-39-26AM/gridSetupActions2026-08-29_10-39-26AM.log.
ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oraInventory/logs/GridSetupActions2026-08-29_10-39-26AM/gridSetupActions2026-08-29_10-39-26AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
/u01/app/26.3/grid/install/response/grid_2026-08-29_10-39-26AM.rsp
You can find the log of this install session at:
/u01/app/oraInventory/logs/GridSetupActions2026-08-29_10-39-26AM/gridSetupActions2026-08-29_10-39-26AM.log
As a root user, run the following script(s):
- /u01/app/26.3/grid/root.sh
Run /u01/app/26.3/grid/root.sh on the following nodes:
rac01
Successfully Setup Software with warning(s).
rac01: Linking interconnect protocol to UDP ...
rac01: Successfully executed clone operation.
rac01: Executing root script on nodes rac01, rac02.
rac01: CRS-5051: Executing script Root
rac01: CRS-5051: Executing script Root
rac01: Check /u01/app/26.3/grid/install/root_rac01_2026-08-29_10-40-35-016495106.log for the output of root script
rac01: Check /u01/app/26.3/grid/install/root_rac02_2026-08-29_10-40-35-020876429.log for the output of root script
rac01: Successfully executed root script on nodes rac01, rac02.
rac01: Oracle home provisioned.
rac01: Working copy creation completed.
rac01: Removing storage for working copy ...
3.3 试切换到新目录
为了避免实际执行报错,可以试切换,类似于空测试。
rhpctl move gihome -eval -sourcehome /u01/app/26.2/grid -desthome /u01/app/26.3/grid
sourcehome =/u01/app/26.2.0/grid
desthome=/u01/app/26.3/grid
具体执行情况:
grid@rac01 \~$ rhpctl move gihome -eval -sourcehome /u01/app/26.2/grid -desthome /u01/app/26.3/grid
rac01: Evaluation in progress for "move gihome" ...
rac01: verifying versions of Oracle homes ...
rac01: verifying owners of Oracle homes ...
rac01: verifying groups of Oracle homes ...
rac01: Performing pre-patch checks...
rac01: cluster upgrade state:PASSED
rac01: OLR Integrity:PASSED
rac01: Hosts File:PASSED
rac01: Path existence, ownership, permissions and attributes:PASSED
rac01: Free Space: rac02:/:PASSED
rac01: Free Space: rac01:/:PASSED
rac01: OPatch utility version consistency:PASSED
rac01: ASM Integrity:PASSED
rac01: Immutable file attribute check:PASSED
rac01: Oracle base: /u01/app/grid:PASSED
rac01: Oracle Linux driver and kernel module signing keys check:INFORMATION
rac01: evaluating the move of Oracle Grid Infrastructure home from home location "/u01/app/26.2/grid" to "/u01/app/26.3/grid" on client cluster "rac-cluster"
rac01: Evaluation finished successfully for "move gihome".
3.4 正式切换到新目录
只需要在一个节点执行即可
grid@rac01 \~$ rhpctl move gihome -sourcehome /u01/app/26.2/grid -desthome /u01/app/26.3/grid
具体执行过程
grid@rac01 \~$ rhpctl move gihome -sourcehome /u01/app/26.2/grid -desthome /u01/app/26.3/grid
rac01: verifying versions of Oracle homes ...
rac01: verifying owners of Oracle homes ...
rac01: verifying groups of Oracle homes ...
rac01: Performing pre-patch checks...
rac01: cluster upgrade state:PASSED
rac01: OLR Integrity:PASSED
rac01: Hosts File:PASSED
rac01: Path existence, ownership, permissions and attributes:PASSED
rac01: Free Space: rac02:/:PASSED
rac01: Free Space: rac01:/:PASSED
rac01: OPatch utility version consistency:PASSED
rac01: ASM Integrity:PASSED
rac01: Immutable file attribute check:PASSED
rac01: Oracle base: /u01/app/grid:PASSED
rac01: Oracle Linux driver and kernel module signing keys check:INFORMATION
rac01: starting to move the Oracle Grid Infrastructure home from location "/u01/app/26.2/grid" to "/u01/app/26.3/grid" on cluster "rac-cluster"
rac01: Executing "prepatch" and "postpatch" scripts on nodes: "rac01".
rac01: Executing "prepatch" script on nodes rac01.
rac01: CRS-5051: Executing script Patch Root
rac01: Using configuration parameter file: /u01/app/26.3/grid/crs/install/crsconfig_params
The log of current session can be found at:
/u01/app/grid/crsdata/rac01/crsconfig/crs_prepatch_apply_oop_rac01_2026-08-29_11-00-55AM.log
rac01:
Performing following verification checks ...
cluster upgrade state ...PASSED
OLR Integrity ...PASSED
Hosts File ...PASSED
Free Space: rac01:/ ...PASSED
ASM Integrity ...PASSED
Software home: /u01/app/26.2/grid ...PASSED
Immutable file attribute check ...PASSED
Oracle Linux driver and kernel module signing keys check ...INFORMATION (PRVG-11250)
Pre-check for Patch Application was successful.
Oracle Linux driver and kernel module signing keys check ...INFORMATION
PRVG-11250 : The check "Oracle Linux driver and kernel module signing keys
check" was not performed because it needs 'root' user privileges.
Refer to My Oracle Support notes "2548970.1" for more details regarding errors
PRVG-11250".
CVU operation performed: stage -pre patch
Date: Aug 29, 2026, 11:00:57 AM
CVU version: 23.26.2.0.0 (032926x8664)
Clusterware version: 23.0.0.0.0
CVU home: /u01/app/26.2/grid
rac01: Grid home: /u01/app/26.2/grid
User: grid
Operating system: Linux6.12.0-205.92.4.2.el10uek.x86_64
rac01: 2026/08/29 11:01:08 CLSRSC-671: Pre-patch steps for patching GI home successfully completed.
rac01: Successfully executed "prepatch" script on nodes rac01.
rac01: Executing "postpatch" script on nodes rac01.
Using configuration parameter file: /u01/app/26.3/grid/crs/install/crsconfig_params
The log of current session can be found at:
/u01/app/grid/crsdata/rac01/crsconfig/crs_postpatch_apply_oop_rac01_2026-08-29_11-01-10AM.log
2026/08/29 11:02:41 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.service'
2026/08/29 11:03:57 CLSRSC-4015: Performing install or upgrade action for Oracle Autonomous Health Framework (AHF).
2026/08/29 11:03:57 CLSRSC-4012: Shutting down Oracle Autonomous Health Framework (AHF).
2026/08/29 11:04:44 CLSRSC-4013: Successfully shut down Oracle Autonomous Health Framework (AHF).
2026/08/29 11:04:46 CLSRSC-672: Post-patch steps for patching GI home successfully completed.
rac01: Successfully executed "postpatch" script on nodes rac01.
rac01: starting instances of databases "orcl" ...
rac01: Updating inventory on nodes: rac01.
rac01: Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 8519 MB Passed
rac01: The inventory pointer is located at /etc/oraInst.loc
You can find the log of this install session at:
/u01/app/oraInventory/logs/UpdateNodeList2026-08-29_11-05-20AM.log
rac01: 'UpdateNodeList' was successful.
rac01: Updated inventory on nodes: rac01.
rac01: Updating inventory on nodes: rac01.
rac01: Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 8414 MB Passed
rac01: The inventory pointer is located at /etc/oraInst.loc
You can find the log of this install session at:
/u01/app/oraInventory/logs/UpdateNodeList2026-08-29_11-05-26AM.log
rac01: 'UpdateNodeList' was successful.
rac01: Updated inventory on nodes: rac01.
rac01: Performing post-patch checks...
rac01: cluster upgrade state:PASSED
rac01: ASM Integrity:PASSED
rac01: Software home: /u01/app/26.3/grid:PASSED
rac01: Executing "prepatch" and "postpatch" scripts on nodes: "rac02".
rac01: Executing "prepatch" script on nodes rac02.
rac01: CRS-5051: Executing script Patch Root
rac01: Using configuration parameter file: /u01/app/26.3/grid/crs/install/crsconfig_params
The log of current session can be found at:
/u01/app/grid/crsdata/rac02/crsconfig/crs_prepatch_apply_oop_rac02_2026-08-29_11-06-01AM.log
rac01:
Performing following verification checks ...
cluster upgrade state ...PASSED
OLR Integrity ...PASSED
Hosts File ...PASSED
Free Space: rac02:/ ...PASSED
ASM Integrity ...PASSED
Software home: /u01/app/26.2/grid ...PASSED
Immutable file attribute check ...PASSED
Oracle Linux driver and kernel module signing keys check ...INFORMATION (PRVG-11250)
Pre-check for Patch Application was successful.
Oracle Linux driver and kernel module signing keys check ...INFORMATION
PRVG-11250 : The check "Oracle Linux driver and kernel module signing keys
check" was not performed because it needs 'root' user privileges.
Refer to My Oracle Support notes "2548970.1" for more details regarding errors
PRVG-11250".
CVU operation performed: stage -pre patch
Date: Aug 29, 2026, 11:06:05 AM
CVU version: 23.26.2.0.0 (032926x8664)
Clusterware version: 23.0.0.0.0
CVU home: /u01/app/26.2/grid
rac01: Grid home: /u01/app/26.2/grid
User: grid
Operating system: Linux6.12.0-205.92.4.2.el10uek.x86_64
rac01: 2026/08/29 11:06:18 CLSRSC-671: Pre-patch steps for patching GI home successfully completed.
rac01: Successfully executed "prepatch" script on nodes rac02.
rac01: Executing "postpatch" script on nodes rac02.
Using configuration parameter file: /u01/app/26.3/grid/crs/install/crsconfig_params
The log of current session can be found at:
/u01/app/grid/crsdata/rac02/crsconfig/crs_postpatch_apply_oop_rac02_2026-08-29_11-06-20AM.log
2026/08/29 11:06:49 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.service'
2026/08/29 11:08:04 CLSRSC-4015: Performing install or upgrade action for Oracle Autonomous Health Framework (AHF).
2026/08/29 11:08:04 CLSRSC-4012: Shutting down Oracle Autonomous Health Framework (AHF).
2026/08/29 11:08:52 CLSRSC-4013: Successfully shut down Oracle Autonomous Health Framework (AHF).
Performing following verification checks ...
cluster upgrade state ...PASSED
Post-check for Patch Application was successful.
CVU operation performed: stage -post patch
Date: Aug 29, 2026, 11:09:00 AM
CVU version: 23.26.3.0.0 (070426x8664)
Clusterware version: 23.0.0.0.0
CVU home: /u01/app/26.3/grid
Grid home: /u01/app/26.3/grid
User: grid
Operating system: Linux6.12.0-205.92.4.2.el10uek.x86_64
2026/08/29 11:09:13 CLSRSC-672: Post-patch steps for patching GI home successfully completed.
rac01: Successfully executed "postpatch" script on nodes rac02.
rac01: starting instances of databases "orcl" ...
rac01: Updating inventory on nodes: rac02.
rac01: Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 8695 MB Passed
rac01: The inventory pointer is located at /etc/oraInst.loc
You can find the log of this install session at:
/u01/app/oraInventory/logs/UpdateNodeList2026-08-29_11-09-33AM.log
rac01: 'UpdateNodeList' was successful.
rac01: Updated inventory on nodes: rac02.
rac01: Updating inventory on nodes: rac02.
rac01: Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 8282 MB Passed
rac01: The inventory pointer is located at /etc/oraInst.loc
You can find the log of this install session at:
/u01/app/oraInventory/logs/UpdateNodeList2026-08-29_11-09-38AM.log
rac01: 'UpdateNodeList' was successful.
rac01: Updated inventory on nodes: rac02.
rac01: Performing post-patch checks...
rac01: cluster upgrade state:PASSED
rac01: ASM Integrity:PASSED
rac01: Software home: /u01/app/26.3/grid:PASSED
rac01: Completed the move of Oracle Grid Infrastructure home
这个执行了10分钟,全程不用人工干预,中间两个节点上的数据库分别启停过一次。
3.5 验证
设置环境两边
export ORACLE_HOME=/u01/app/26.3/grid
export PATH=ORACLE_HOME/bin:PATH
grid@rac01 \~ cd ORACLE_HOME/Opatch
grid@rac01 OPatch$ ./opatch lspatches
39578862;MICRONAUT RELEASE UPDATE 23.26.3.0.0 (39578862) Gold Image
39578856;RHP RELEASE UPDATE 23.26.3.0.0 (39578856) Gold Image
39578865;ACFS RELEASE UPDATE 23.26.3.0.0 (39578865) Gold Image
39578859;OCW RELEASE UPDATE 23.26.3.0.0 (39578859) Gold Image
39578879;Database Release Update : 23.26.3.0.0 (39578879) Gold Image
OPatch succeeded.
grid@rac01 OPatch$ ./opatch version
OPatch Version: 12.2.0.1.52
OPatch succeeded.
grid@rac01 OPatch$ lsnrctl status
LSNRCTL for Linux: Version 23.26.3.0.0 - Production on 29-AUG-2026 11:14:48
Copyright (c) 1991, 2026, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 23.26.3.0.0 - Production
Start Date 29-AUG-2026 11:03:44
Uptime 0 days 0 hr. 11 min. 3 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/26.3/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/rac01/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.133.101)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.133.103)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "+ASM_CRSDG" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "+ASM_DATADG" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "+ASM_FRA" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "48945b67d121c623e063399b5e6478e6" has 1 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
Service "49995ac5f9a39e92e0636685a8c0b98a" has 1 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
Service "orcl_orclpdb1" has 1 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
Service "orclpdb1" has 1 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
The command completed successfully
grid@rac01 OPatch$
4. 给数据库安装 26.3
4.1 在两个节点建立数据库的新ORACLE HOME目录
mkdir -p /u01/app/oracle/product/26.3/dbhome_1
chown -R oracle:oinstall /u01/app/oracle/product/26.3
chmod -R 775 /u01/app/oracle/product/26.3
root@rac01 \~# ls -ltr /u01/app/oracle/product/
total 0
drwxrwxr-x 3 oracle oinstall 22 May 5 20:10 26.2
drwxrwxr-x 3 oracle oinstall 22 Aug 29 11:16 26.3
4.2 部署ORACLE HOME到新位置
必须使用GRID用户来执行,否则,会报权限问题
下面先以ORACLE用户执行,会报错:
root@rac01 db# su - oracle
Last login: Tue May 5 20:06:24 CST 2026 on pts/0
oracle@rac01 \~$ which rhpctl
/u01/app/oracle/product/26.2/dbhome_1/bin/rhpctl
oracle@rac01 \~$ rhpctl deploy home -path /u01/app/oracle/product/26.3/dbhome_1 -zip /u01/setup/db/p39581612_230000_Linux-x86-64.zip -sourcehome /u01/app/oracle/product/26.2/dbhome_1
PRCG-1238 : failed to execute the Rapid Home Provisioning action for command 'deploy home'
PRGH-1252 : User "oracle" lacks the authority to perform the "deploy home" operation. Run the operation from GI home "/u01/app/26.3/grid" as CRS user "grid".
使用grid 用户执行,问题解决
root@rac01 db# su - grid
Last login: Tue May 5 20:06:10 CST 2026 on pts/0
grid@rac01 \~$ cd /u01/app/26.3/grid/bin
grid@rac01 bin$ ./rhpctl deploy home -path /u01/app/oracle/product/26.3/dbhome_1 -zip /u01/setup/db/p39581612_230000_Linux-x86-64.zip -sourcehome /u01/app/oracle/product/26.2/dbhome_1
具体如下:
grid@rac01 bin$ ./rhpctl deploy home -path /u01/app/oracle/product/26.3/dbhome_1 -zip /u01/setup/db/p39581612_230000_Linux-x86-64.zip -sourcehome /u01/app/oracle/product/26.2/dbhome_1
rac01: PRVE-0421 : No entry exists in /etc/fstab for mounting /dev/shm
PRVE-0421 : No entry exists in /etc/fstab for mounting /dev/shm
rac01: Storing metadata in repository for working copy "DEST_HOME_PATH_WC-869658694" ...
rac01: Making a local copy ...
rac01: Extracting files to directory /u01/app/oracle/product/26.3/dbhome_1...
rac01: Files successfully extracted
rac01: Copying home contents...
rac01: Changing the home ownership to user oracle...
rac01: Changing the home ownership to user oracle and group oinstall...
rac01: Starting clone operation...
rac01: CRS-5051: Executing script Root
rac01: CRS-5051: Executing script Root
rac01: Launching Oracle AI Database Setup Wizard...
rac01: Launching Oracle AI Database Setup Wizard...
rac01: The response file for this session can be found at:
/u01/app/oracle/product/26.3/dbhome_1/install/response/db_2026-08-29_11-26-00AM.rsp
rac01: The response file for this session can be found at:
/u01/app/oracle/product/26.3/dbhome_1/install/response/db_2026-08-29_11-26-00AM.rsp
rac01: You can find the log of this install session at:
/u01/app/oraInventory/logs/InstallActions2026-08-29_11-26-00AM/installActions2026-08-29_11-26-00AM.log
rac01: You can find the log of this install session at:
/u01/app/oraInventory/logs/InstallActions2026-08-29_11-26-00AM/installActions2026-08-29_11-26-00AM.log
rac01:
As a root user, run the following script(s):
- /u01/app/oracle/product/26.3/dbhome_1/root.sh
Run /u01/app/oracle/product/26.3/dbhome_1/root.sh on the following nodes:
rac02
Successfully Setup Software.
rac01:
As a root user, run the following script(s):
- /u01/app/oracle/product/26.3/dbhome_1/root.sh
Run /u01/app/oracle/product/26.3/dbhome_1/root.sh on the following nodes:
rac01
Successfully Setup Software.
rac01: Successfully executed clone operation.
rac01: Linking interconnect protocol to UDP ...
rac01: Executing root script on nodes rac01,rac02.
rac01: CRS-5051: Executing script Root
rac01: CRS-5051: Executing script Root
rac01: Check /u01/app/oracle/product/26.3/dbhome_1/install/root_rac01_2026-08-29_11-27-20-033220221.log for the output of root script
rac01: Check /u01/app/oracle/product/26.3/dbhome_1/install/root_rac02_2026-08-29_11-27-20-030786789.log for the output of root script
rac01: Successfully executed root script on nodes rac01,rac02.
rac01: Working copy creation completed.
这个比较快,3分钟搞定
4.3 试切换到新目录
使用oracle,grid用户都可以,我这里使用oracle用户来执行
oracle@rac01 \~$ rhpctl move database -eval -sourcehome /u01/app/oracle/product/26.2/dbhome_1 -desthome /u01/app/oracle/product/26.3/dbhome_1 -dbname orcl
执行过程:
root@rac01 db# su - oracle
Last login: Tue May 5 20:32:11 CST 2026
oracle@rac01 \~ echo ORACLE_SID
orcl1
rhpctl move database -eval -sourcehome /u01/app/oracle/product/26.2/dbhome_1 -desthome /u01/app/oracle/product/26.3/dbhome_1 -dbname orcl
rac01: Evaluation in progress for "move database" ...
rac01: verifying versions of Oracle homes ...
rac01: verifying owners of Oracle homes ...
rac01: verifying groups of Oracle homes ...
rac01: starting evaluation for moving the following databases: "orcl"
rac01: Performing pre-patch checks...
rac01: Oracle Net Services configuration:PASSED
rac01: Oracle base: /u01/app/oracle:PASSED
rac01: Datapatch sanity checks reported WARNING for database "orcl" running on instance "orcl1" at ORACLE home "/u01/app/oracle/product/26.2/dbhome_1". Datapatch output:
SQL Patching sanity checks version 23.26.2.0.0 on Sat Aug 29 11:33:05 2026
Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sanity_checks_20260829_113305_131655/sanity_checks_20260829_113305_131655.log
RAC detected, verifying SSH connection...
Done
Running checks for the provided DB orcl1:/u01/app/oracle/product/26.2/dbhome_1
Checks completed. Printing report:
Check: Dictionary statistics gathering - WARNING
Patching the database without recent data dictionary statistics gathered may lead to performance issues.
Data dictionary statistics are older than 7 days.
Run the following queries to start gathering the dictionary statistics:
EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;
EXEC DBMS_SYSTEM.GATHER_FIXED_OBJECTS_STATS;
PDB$SEED:
| LATEST | OPERATION | STATUS |
|-----------------+-------------------------+-----------|
| 30-JAN-26 18:20 | gather_dictionary_stats | COMPLETED |
|-----------------+-------------------------+-----------|
Check: Locale - WARNING
The environmental variables LC_ALL and LC_CTYPE need to be properly set for successful execution of Queryable Patch Inventory.
The following list shows the node(s) where environment variables LC_ALL and LC_CTYPE are not properly configured or cannot be determined.
rac02:
egrep: warning: egrep is obsolescent; using grep -E
SQL Patching sanity checks completed on Sat Aug 29 11:33:20 2026
rac01: Evaluation finished successfully for "move database".
4.4 正式切换到新目录
oracle@rac01 \~$ rhpctl move database -sourcehome /u01/app/oracle/product/26.2/dbhome_1 -desthome /u01/app/oracle/product/26.3/dbhome_1 -dbname orcl
执行过程:
root@rac01 \~# su - oracle
Last login: Sat Aug 29 11:31:44 CST 2026 on pts/0
oracle@rac01 \~$ rhpctl move database -sourcehome /u01/app/oracle/product/26.2/dbhome_1 -desthome /u01/app/oracle/product/26.3/dbhome_1 -dbname orcl
rac01: verifying versions of Oracle homes ...
rac01: verifying owners of Oracle homes ...
rac01: verifying groups of Oracle homes ...
rac01: Starting to move database from "/u01/app/oracle/product/26.2/dbhome_1" to "/u01/app/oracle/product/26.3/dbhome_1"
rac01: Performing pre-patch checks...
rac01: Oracle Net Services configuration:PASSED
rac01: Oracle base: /u01/app/oracle:PASSED
rac01: Datapatch sanity checks reported WARNING for database "orcl" running on instance "orcl1" at ORACLE home "/u01/app/oracle/product/26.2/dbhome_1". Datapatch output:
SQL Patching sanity checks version 23.26.2.0.0 on Sat Aug 29 11:37:34 2026
Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sanity_checks_20260829_113734_139708/sanity_checks_20260829_113734_139708.log
RAC detected, verifying SSH connection...
Done
Running checks for the provided DB orcl1:/u01/app/oracle/product/26.2/dbhome_1
Checks completed. Printing report:
Check: Dictionary statistics gathering - WARNING
Patching the database without recent data dictionary statistics gathered may lead to performance issues.
Data dictionary statistics are older than 7 days.
Run the following queries to start gathering the dictionary statistics:
EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;
EXEC DBMS_SYSTEM.GATHER_FIXED_OBJECTS_STATS;
PDB$SEED:
| LATEST | OPERATION | STATUS |
|-----------------+-------------------------+-----------|
| 30-JAN-26 18:20 | gather_dictionary_stats | COMPLETED |
|-----------------+-------------------------+-----------|
Check: Locale - WARNING
The environmental variables LC_ALL and LC_CTYPE need to be properly set for successful execution of Queryable Patch Inventory.
The following list shows the node(s) where environment variables LC_ALL and LC_CTYPE are not properly configured or cannot be determined.
rac02:
egrep: warning: egrep is obsolescent; using grep -E
SQL Patching sanity checks completed on Sat Aug 29 11:37:41 2026
rac01: moving databases: "orcl" on nodes: "rac01"
rac01: retrieving status of databases "orcl"...
rac01: copying database configuration files from Oracle home "/u01/app/oracle/product/26.2/dbhome_1" to Oracle home "/u01/app/oracle/product/26.3/dbhome_1" ...
rac01: retrieving status of services of databases "orcl" ...
rac01: relocating services of databases "orcl" ...
rac01: stopping services of databases "orcl" ...
rac01: stopping instances of databases "orcl" ...
rac01: starting instances of databases "orcl" ...
rac01: moving databases: "orcl" on nodes: "rac02"
rac01: retrieving status of databases "orcl"...
rac01: copying database configuration files from Oracle home "/u01/app/oracle/product/26.2/dbhome_1" to Oracle home "/u01/app/oracle/product/26.3/dbhome_1" ...
rac01: relocating services of databases "orcl" ...
rac01: stopping services of databases "orcl" ...
rac01: stopping instances of databases "orcl" ...
rac01: starting instances of databases "orcl" ...
rac01: retrieving status of databases "orcl"...
rac01: Checking datapatch execution requirement for database 'orcl' ...
rac01: Datapatch executed succesfully for DB 'orcl' ...
rac01: Checking datapatch execution requirement for database 'orcl' ...
rac01: Datapatch executed succesfully for DB 'orcl' ...
rac01: Performing post-patch checks...
rac01: Completed the 'move database' operation
Databases moved from Oracle home "/u01/app/oracle/product/26.2/dbhome_1" to Oracle home "/u01/app/oracle/product/26.3/dbhome_1" : "orcl"
4.5 启用补丁
列出两阶段补丁
select BUG_NUMBER from V$RAC_TWO_STAGE_ROLLING_UPDATES;
启用两阶段补丁
SQL> ALTER SYSTEM ENABLE RAC TWO_STAGE ROLLING UPDATES ALL;
再次验证补丁生效
SQL> SELECT * FROM V$RAC_TWO_STAGE_ROLLING_UPDATES;
4.6 验证数据库补丁
修改环境变量
vim .bash_profile
ORACLE_HOME=newhome
oracle@rac01 \~ cd ORACLE_HOME/OPatch
oracle@rac01 OPatch$ ./opatch lspatches
39578859;OCW RELEASE UPDATE 23.26.3.0.0 (39578859) Gold Image
39578879;Database Release Update : 23.26.3.0.0 (39578879) Gold Image
OPatch succeeded.
oracle@rac01 OPatch$
oracle@rac01 OPatch$ sqlplus /nolog
SQL*Plus: Release 23.26.3.0.0 - Production on Sat Aug 29 12:15:54 2026
Version 23.26.3.0.0
Copyright (c) 1982, 2026, Oracle. All rights reserved.
SQL> conn / as sysdba
Connected.
SQL> select banner from v$version;
BANNER
Oracle AI Database 26ai Enterprise Edition Release 23.26.3.0.0 - Production
SQL> set line 200
SQL> select banner from v$version;
BANNER
Oracle AI Database 26ai Enterprise Edition Release 23.26.2.0.0 - Production
SQL>
col DESCRIPTION for a60
col STATUS for a10
set line 200
SQL> select PATCH_ID,PATCH_TYPE,DESCRIPTION,ACTION,ACTION_TIME,STATUS,TARGET_VERSION from dba_registry_sqlpatch
PATCH_ID PATCH_TYPE DESCRIPTION ACTION ACTION_TIME STATUS TARGET_VERSION
38743669 RU Database Release Update : 23.26.1.0.0 (38743669) Gold Image APPLY 30-JAN-26 06.19.51.209035 PM SUCCESS 23.26.1.0.0
39093711 RU Database Release Update : 23.26.2.0.0 (39093711) Gold Image APPLY 05-MAY-26 08.53.54.924308 PM SUCCESS 23.26.2.0.0
39578879 RU Database Release Update : 23.26.3.0.0 (39578879) Gold Image APPLY 29-AUG-26 11.45.55.759372 AM SUCCESS 23.26.3.0.0
SQL>
至此,26ai rac ru补丁升级完毕。