|
不知大家注意没有,以前打补丁,比较麻烦,要停机很久,在原地打补丁,风险比较高,ORACLE 从26AI开始,每个季度RU补丁,在原来补丁形式的基础上,还提供了一个GOLD IMAGE 介质,可以不停机先直接在非原地安装好新版本,再切换到新版本路径,中间都不需要手工停止数据库,起到非常短时间影响使用。下面我们以安装ru 26.2 为例看看如何来实现。 1. 当前环境 ORACLE LINUX10.1 ORACLE AI DATABASE26ai 23.26.1 rac 2节点 用户:grid,oracle 安装位置: 26.1 位置: grid_home=/u01/app/26.1.0/grid oracle_home=/u01/app/oracle/product/26.1.0/dbhome_1 26.2 位置 grid_home=/u01/app/26.2/grid oracle_home=/u01/app/oracle/product/26.2/dbhome_1 2. 下载Oracle AI Database26ai 26.2 gold image 文件具体位置可以参见mos 文章 Primary Note for Database QuarterlyRelease Updates -KB106822 找到 Database26ai 部分
这里,我们下载 database 和gi 的goldimage 即可。 介质只需要上传到 oracle 26ai rac 安装环境其中一台机器中去。 我这里放在/u01/setup/{grid,db} 下面 [root@rac01setup]# 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 3directories, 4 files 1. 给gi 安装 26.2 1.1 在两个节点上建立新ORACLE_HOME 目录 mkdir /u01/app/26.2/grid -p chown -Rroot:oinstall /u01/app/26.2/grid 1.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.2/grid -zip/u01/setup/grid/gold_image.zip 具体过程见下面 [grid@rac01 ~]$ rhpctl deploy home -path /u01/app/26.2/grid -zip/u01/setup/grid/gold_image.zip rac01: Storing metadata in repository for working copy"DEST_HOME_PATH_WC1572384279" ... rac01: Changing the home ownership to user grid:... rac01: Changing the home ownership to user grid:... rac01: Extracting files to directory /u01/app/26.2/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 groupoinstall... 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 whetherthe 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 notavailable on node "rac01" [Required physical memory = 8GB(8388608.0KB)] Cause: Amount of physicalmemory (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 someoptional requirements. CAUSE: Some of theoptional prerequisites are not met. See logs for details./u01/app/oraInventory/logs/GridSetupActions2026-05-05_07-01-17PM/gridSetupActions2026-05-05_07-01-17PM.log. rac01: ACTION: Identifythe list of failed prerequisite checks from the log:/u01/app/oraInventory/logs/GridSetupActions2026-05-05_07-01-17PM/gridSetupActions2026-05-05_07-01-17PM.log.Then either from the log file or from installation manual find the appropriateconfiguration to meet the prerequisites and fix it manually. The response file for this session can be found at: /u01/app/26.2/grid/install/response/grid_2026-05-05_07-01-17PM.rsp rac01: ********************************************* Physical Memory: This is a prerequisite condition to test whetherthe 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 notavailable on node "rac02" [Required physical memory = 8GB(8388608.0KB)] Cause: Amount of physicalmemory (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 someoptional requirements. CAUSE: Some of theoptional prerequisites are not met. See logs for details./u01/app/oraInventory/logs/GridSetupActions2026-05-05_07-01-17PM/gridSetupActions2026-05-05_07-01-17PM.log. rac01: ACTION: Identifythe list of failed prerequisite checks from the log:/u01/app/oraInventory/logs/GridSetupActions2026-05-05_07-01-17PM/gridSetupActions2026-05-05_07-01-17PM.log.Then either from the log file or from installation manual find the appropriateconfiguration to meet the prerequisites and fix it manually. The response file for this session can be found at: /u01/app/26.2/grid/install/response/grid_2026-05-05_07-01-17PM.rsp rac01: You can find the log of this install session at: /u01/app/oraInventory/logs/GridSetupActions2026-05-05_07-01-17PM/gridSetupActions2026-05-05_07-01-17PM.log rac01: You can find the log of this install session at: /u01/app/oraInventory/logs/GridSetupActions2026-05-05_07-01-17PM/gridSetupActions2026-05-05_07-01-17PM.log rac01: As a root user, run the following script(s): 1./u01/app/26.2/grid/root.sh Run /u01/app/26.2/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 whetherthe 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 notavailable on node "rac01" [Required physical memory = 8GB(8388608.0KB)] Cause: Amount of physicalmemory (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 someoptional requirements. CAUSE: Some of theoptional prerequisites are not met. See logs for details./u01/app/oraInventory/logs/GridSetupActions2026-05-05_07-01-17PM/gridSetupActions2026-05-05_07-01-17PM.log. ACTION: Identify the listof failed prerequisite checks from the log:/u01/app/oraInventory/logs/GridSetupActions2026-05-05_07-01-17PM/gridSetupActions2026-05-05_07-01-17PM.log.Then either from the log file or from installation manual find the appropriateconfiguration to meet the prerequisites and fix it manually. The response file for this session can be found at: /u01/app/26.2/grid/install/response/grid_2026-05-05_07-01-17PM.rsp You can find the log of this install session at: /u01/app/oraInventory/logs/GridSetupActions2026-05-05_07-01-17PM/gridSetupActions2026-05-05_07-01-17PM.log As a root user, run the following script(s): 1./u01/app/26.2/grid/root.sh Run /u01/app/26.2/grid/root.sh on the following nodes: [rac01] Successfully Setup Software with warning(s). rac01: As a root user, run the following script(s): 1./u01/app/26.2/grid/root.sh Run /u01/app/26.2/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 whetherthe 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 notavailable on node "rac02" [Required physical memory = 8GB(8388608.0KB)] Cause: Amount of physicalmemory (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 someoptional requirements. CAUSE: Some of theoptional prerequisites are not met. See logs for details./u01/app/oraInventory/logs/GridSetupActions2026-05-05_07-01-17PM/gridSetupActions2026-05-05_07-01-17PM.log. ACTION: Identify the listof failed prerequisite checks from the log:/u01/app/oraInventory/logs/GridSetupActions2026-05-05_07-01-17PM/gridSetupActions2026-05-05_07-01-17PM.log.Then either from the log file or from installation manual find the appropriateconfiguration to meet the prerequisites and fix it manually. The response file for this session can be found at: /u01/app/26.2/grid/install/response/grid_2026-05-05_07-01-17PM.rsp You can find the log of this install session at: /u01/app/oraInventory/logs/GridSetupActions2026-05-05_07-01-17PM/gridSetupActions2026-05-05_07-01-17PM.log As a root user, run the following script(s): 1./u01/app/26.2/grid/root.sh Run /u01/app/26.2/grid/root.sh on the following nodes: [rac02] 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.2/grid/install/root_rac02_2026-05-05_19-02-27-266263030.log for theoutput of root script rac01: Check/u01/app/26.2/grid/install/root_rac01_2026-05-05_19-02-27-269218942.log for theoutput 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 ... [grid@rac01 ~]$ 1.3 试切换到新目录 为了避免实际执行报错,可以试切换,类似于空测试。 rhpctl move gihome -eval -sourcehome /u01/app/26.1.0/grid -desthome/u01/app/26.2/grid sourcehome =/u01/app/26.1.0/grid desthome=/u01/app/26.2/grid 具体执行情况: [grid@rac01 ~]$ rhpctl move gihome -eval-sourcehome /u01/app/26.1.0/grid -desthome /u01/app/26.2/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 versionconsistency:PASSED rac01: ASM Integrity:PASSED rac01: Immutable file attributecheck:PASSED rac01: Oracle base: /u01/app/grid:PASSED rac01: Oracle Linux driver and kernelmodule signing keys check:INFORMATION rac01: evaluating the move of Oracle GridInfrastructure home from home location "/u01/app/26.1.0/grid" to"/u01/app/26.2/grid" on client cluster "rac-cluster" rac01: Evaluation finished successfullyfor "move gihome". [grid@rac01 ~]$ 1.4 正式切换到新目录 只需要在一个节点执行即可 [grid@rac01~]$ rhpctl move gihome -sourcehome/u01/app/26.1.0/grid -desthome /u01/app/26.2/grid 具体执行过程 [grid@rac01 ~]$ rhpctl move gihome -sourcehome /u01/app/26.1.0/grid -desthome/u01/app/26.2/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 versionconsistency:PASSED rac01: ASM Integrity:PASSED rac01: Immutable file attributecheck:PASSED rac01: Oracle base: /u01/app/grid:PASSED rac01: Oracle Linux driver and kernelmodule signing keys check:INFORMATION rac01: starting to move the Oracle GridInfrastructure home from location "/u01/app/26.1.0/grid" to"/u01/app/26.2/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 PatchRoot rac01: Using configuration parameterfile: /u01/app/26.2/grid/crs/install/crsconfig_params The log of current session can be foundat: /u01/app/grid/crsdata/rac01/crsconfig/crs_prepatch_apply_oop_rac01_2026-05-05_07-23-53PM.log rac01: Performing following verification checks ... cluster upgrade state ...PASSED OLR Integrity ...PASSED Hosts File ...PASSED Free Space: rac01:/ ...PASSED Software home: /u01/app/26.1.0/grid ...PASSED Immutable file attribute check ...PASSED Pre-check for Patch Application wassuccessful. CVU operation performed: stage -pre patch Date: May 5, 2026, 7:24:06PM CVU version: 23.26.1.0.0 (010926x8664) Clusterware version: 23.0.0.0.0 CVU home: /u01/app/26.1.0/grid Grid home: /u01/app/26.1.0/grid User: grid Operating system: Linux6.12.0-105.51.5.el10uek.x86_64 rac01: 2026/05/05 19:24:21 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.2/grid/crs/install/crsconfig_params The log of current session can be foundat: /u01/app/grid/crsdata/rac01/crsconfig/crs_postpatch_apply_oop_rac01_2026-05-05_07-24-23PM.log 2026/05/05 19:24:49 CLSRSC-329: ReplacingClusterware entries in file 'oracle-ohasd.service' 2026/05/05 19:25:46 CLSRSC-4015:Performing install or upgrade action for Oracle Autonomous Health Framework(AHF). 2026/05/05 19:25:46 CLSRSC-4012: Shuttingdown Oracle Autonomous Health Framework (AHF). 2026/05/05 19:26:32 CLSRSC-4013:Successfully shut down Oracle Autonomous Health Framework (AHF). 2026/05/05 19:27:24 CLSRSC-4003:Successfully patched Oracle Autonomous Health Framework (AHF). 2026/05/05 19:27:38 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 UniversalInstaller... Checking swap space: must be greater than500 MB. Actual 7912 MB Passed rac01: The inventory pointer is locatedat /etc/oraInst.loc You can find the log of this installsession at: /u01/app/oraInventory/logs/UpdateNodeList2026-05-05_07-28-35PM.log rac01: 'UpdateNodeList' was successful. rac01: Updated inventory on nodes: rac01. rac01: Updating inventory on nodes:rac01. rac01: Starting Oracle UniversalInstaller... Checking swap space: must be greater than500 MB. Actual 7728 MB Passed rac01: The inventory pointer is locatedat /etc/oraInst.loc You can find the log of this installsession at: /u01/app/oraInventory/logs/UpdateNodeList2026-05-05_07-28-39PM.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.2/grid:PASSED rac01: Executing "prepatch" and"postpatch" scripts on nodes: "rac02". rac01: Executing "prepatch"script on nodes [rac02]. rac01: CRS-5051: Executing script PatchRoot rac01: Using configuration parameterfile: /u01/app/26.2/grid/crs/install/crsconfig_params The log of current session can be foundat: /u01/app/grid/crsdata/rac02/crsconfig/crs_prepatch_apply_oop_rac02_2026-05-05_07-29-25PM.log rac01: Performing following verification checks ... cluster upgrade state ...PASSED OLR Integrity ...PASSED Hosts File ...PASSED Free Space: rac02:/ ...PASSED Software home: /u01/app/26.1.0/grid ...PASSED Immutable file attribute check ...PASSED Pre-check for Patch Application wassuccessful. CVU operation performed: stage -pre patch Date: May 5, 2026, 7:29:38PM CVU version: 23.26.1.0.0 (010926x8664) Clusterware version: 23.0.0.0.0 CVU home: /u01/app/26.1.0/grid Grid home: /u01/app/26.1.0/grid User: grid Operating system: Linux6.12.0-105.51.5.el10uek.x86_64 rac01: 2026/05/05 19:29:53 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.2/grid/crs/install/crsconfig_params The log of current session can be foundat: /u01/app/grid/crsdata/rac02/crsconfig/crs_postpatch_apply_oop_rac02_2026-05-05_07-29-55PM.log 2026/05/05 19:30:23 CLSRSC-329: ReplacingClusterware entries in file 'oracle-ohasd.service' 2026/05/05 19:31:22 CLSRSC-4015:Performing install or upgrade action for Oracle Autonomous Health Framework(AHF). 2026/05/05 19:31:22 CLSRSC-4012: Shuttingdown Oracle Autonomous Health Framework (AHF). 2026/05/05 19:31:36 CLSRSC-4013:Successfully shut down Oracle Autonomous Health Framework (AHF). 2026/05/05 19:32:44 CLSRSC-4003:Successfully patched Oracle Autonomous Health Framework (AHF). Performing following verification checks ... cluster upgrade state ...PASSED Post-check for Patch Application wassuccessful. CVU operation performed: stage -post patch Date: May 5, 2026, 7:32:51PM CVU version: 23.26.2.0.0 (032926x8664) Clusterware version: 23.0.0.0.0 CVU home: /u01/app/26.2/grid Grid home: /u01/app/26.2/grid User: grid Operating system: Linux6.12.0-105.51.5.el10uek.x86_64 2026/05/05 19:33:09 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 UniversalInstaller... Checking swap space: must be greater than500 MB. Actual 7427 MB Passed rac01: The inventory pointer is locatedat /etc/oraInst.loc You can find the log of this installsession at: /u01/app/oraInventory/logs/UpdateNodeList2026-05-05_07-33-28PM.log 'UpdateNodeList' was successful. rac01: Updated inventory on nodes: rac02. rac01: Updating inventory on nodes:rac02. rac01: Starting Oracle UniversalInstaller... Checking swap space: must be greater than500 MB. Actual 7422 MB Passed rac01: The inventory pointer is locatedat /etc/oraInst.loc You can find the log of this installsession at: /u01/app/oraInventory/logs/UpdateNodeList2026-05-05_07-33-32PM.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.2/grid:PASSED rac01: Completed the move of Oracle GridInfrastructure home [grid@rac01 ~]$ 1.5 验证 设置环境两边 export ORACLE_HOME=/u01/app/26.2/grid export PATH=$ORACLE_HOME/bin:$PATH [grid@rac01 ~]$ cd$ORACLE_HOME/OPatch [grid@rac01 OPatch]$ ./opatchlspatches 39099119;MICRONAUT RELEASEUPDATE 23.26.2.0.0 (39099119) Gold Image 39099244;RHP RELEASE UPDATE23.26.2.0.0 (39099244) Gold Image 39099110;ACFS RELEASE UPDATE23.26.2.0.0 (39099110) Gold Image 39093738;OCW RELEASE UPDATE23.26.2.0.0 (39093738) Gold Image 39093711;Database ReleaseUpdate : 23.26.2.0.0 (39093711) Gold Image OPatch succeeded. [grid@rac01 OPatch]$ ./opatchversion OPatch Version: 12.2.0.1.51 OPatch succeeded. [grid@rac01 ~]$ lsnrctl status LSNRCTL for Linux: Version 23.26.2.0.0 -Production on 05-MAY-2026 22:12:05 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: Version23.26.2.0.0 - Production Start Date 05-MAY-2026 21:46:15 Uptime 0 days 0 hr. 25 min. 50 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/26.2/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))) 2. 给数据库安装 26.2 2.1 在两个节点建立数据库的新ORACLE HOME目录 mkdir -p /u01/app/oracle/product/26.2/dbhome_1 chown -Roracle:oinstall /u01/app/oracle/product/26.2 chmod -R 775/u01/app/oracle/product/26.2 [root@rac01~]# ls -ltr /u01/app/oracle/product/ total 0 drwxrwxr-x 3oracle oinstall 22 Jan 30 16:28 26.1.0 drwxrwxr-x 3oracle oinstall 22 May 5 20:06 26.2 2.2 部署ORACLE HOME到新位置 必须使用GRID用户来执行,否则,会报权限问题 下面先以ORACLE用户执行,会报错: [root@rac01db]# su - oracle Last login:Tue May 5 20:06:24 CST 2026 on pts/0 [oracle@rac01~]$ which rhpctl /u01/app/oracle/product/26.1.0/dbhome_1/bin/rhpctl [oracle@rac01~]$ rhpctl deploy home -path /u01/app/oracle/product/26.2/dbhome_1 -zip/u01/setup/db/gold_image.zip -sourcehome/u01/app/oracle/product/26.1.0/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 "deployhome" operation. Run the operation from GI home"/u01/app/26.2/grid" as CRS user "grid". 使用grid用户执行,问题解决 [root@rac01db]# su - grid Last login:Tue May 5 20:06:10 CST 2026 on pts/0 [grid@rac01~]$ cd /u01/app/26.2/grid/bin [grid@rac01bin]$ rhpctl deploy home -path /u01/app/oracle/product/26.2/dbhome_1 -zip/u01/setup/db/gold_image.zip -sourcehome/u01/app/oracle/product/26.1.0/dbhome_1 具体如下: [grid@rac01 bin]$ rhpctl deploy home -path/u01/app/oracle/product/26.2/dbhome_1 -zip /u01/setup/db/gold_image.zip-sourcehome /u01/app/oracle/product/26.1.0/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-673145189" ... rac01: Making a local copy ... rac01: Extracting files to directory/u01/app/oracle/product/26.2/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 groupoinstall... 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.2/dbhome_1/install/response/db_2026-05-05_08-25-01PM.rsp rac01: The response file for this session can be found at: /u01/app/oracle/product/26.2/dbhome_1/install/response/db_2026-05-05_08-25-01PM.rsp rac01: You can find the log of this install session at: /u01/app/oraInventory/logs/InstallActions2026-05-05_08-25-01PM/installActions2026-05-05_08-25-01PM.log rac01: You can find the log of this install session at: /u01/app/oraInventory/logs/InstallActions2026-05-05_08-25-01PM/installActions2026-05-05_08-25-01PM.log rac01: As a root user, run the following script(s): 1./u01/app/oracle/product/26.2/dbhome_1/root.sh Run /u01/app/oracle/product/26.2/dbhome_1/root.sh on the followingnodes: [rac02] Successfully Setup Software. rac01: As a root user, run the following script(s): 1./u01/app/oracle/product/26.2/dbhome_1/root.sh Run /u01/app/oracle/product/26.2/dbhome_1/root.sh on the followingnodes: [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.2/dbhome_1/install/root_rac01_2026-05-05_20-26-39-276529191.logfor the output of root script rac01: Check/u01/app/oracle/product/26.2/dbhome_1/install/root_rac02_2026-05-05_20-26-39-268500645.logfor the output of root script rac01: Successfully executed root script on nodes rac01,rac02. rac01: Working copy creation completed. 2.3 试切换到新目录 使用oracle,grid用户都可以,我这里使用oracle用户来执行 [oracle@rac01~]$ rhpctl move database -eval -sourcehome/u01/app/oracle/product/26.1.0/dbhome_1 -desthome/u01/app/oracle/product/26.2/dbhome_1 -dbname orcl 执行过程: [root@rac01 db]# su - oracle Last login: Tue May 520:32:11 CST 2026 [oracle@rac01 ~]$ echo $ORACLE_SID orcl1 [oracle@rac01 ~]$ rhpctl move database -eval -sourcehome/u01/app/oracle/product/26.1.0/dbhome_1 -desthome/u01/app/oracle/product/26.2/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.1.0/dbhome_1". Datapatch output: SQL Patching sanity checks version 23.26.1.0.0 on Tue 05 May 202608:36:06 PM CST Log file for this invocation:/u01/app/oracle/cfgtoollogs/sqlpatch/sanity_checks_20260505_203606_262621/sanity_checks_20260505_203606_262621.log RAC detected, verifying SSH connection... Done Running checks for the provided DBorcl1:/u01/app/oracle/product/26.1.0/dbhome_1 Checks completed. Printing report: Check: Dictionary statistics gathering - WARNING Patching the databasewithout recent data dictionary statistics gathered may lead to performanceissues. Data dictionary statisticsare older than 7 days. Run the following queriesto start gathering the dictionary statistics: EXECDBMS_STATS.GATHER_DICTIONARY_STATS; EXECDBMS_SYSTEM.GATHER_FIXED_OBJECTS_STATS; CDB$ROOT: | LATEST | OPERATION | STATUS | |-----------------+-------------------------+-----------| | 30-JAN-26 18:20 |gather_dictionary_stats | COMPLETED | |-----------------+-------------------------+-----------| PDB$SEED: | LATEST | OPERATION | STATUS | |-----------------+-------------------------+-----------| | 30-JAN-26 18:20 |gather_dictionary_stats | COMPLETED | |-----------------+-------------------------+-----------| Check: Locale - WARNING The environmental variablesLC_ALL and LC_CTYPE need to be properly set for successful execution ofQueryable Patch Inventory. The following list showsthe node(s) where environment variables LC_ALL and LC_CTYPE are not properlyconfigured or cannot be determined. rac02: egrep: warning: egrep isobsolescent; using grep -E SQL Patching sanity checks completed on Tue 05 May 2026 08:36:26 PMCST rac01: Evaluation finished successfully for "movedatabase". [oracle@rac01 ~]$ 2.4 正式切换到新目录 [oracle@rac01 ~]$ rhpctl move database -sourcehome /u01/app/oracle/product/26.1.0/dbhome_1 -desthome/u01/app/oracle/product/26.2/dbhome_1 -dbname orcl 执行过程: [root@rac01 db]# su - oracle Last login: Tue May 5 20:33:35 CST 2026 on pts/0 [oracle@rac01 ~]$ rhpctl movedatabase -sourcehome/u01/app/oracle/product/26.1.0/dbhome_1 -desthome/u01/app/oracle/product/26.2/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.1.0/dbhome_1" to"/u01/app/oracle/product/26.2/dbhome_1" rac01: Performing pre-patch checks... rac01: Oracle Net Servicesconfiguration:PASSED rac01: Oracle base:/u01/app/oracle:PASSED rac01: Datapatch sanity checks reportedWARNING for database "orcl" running on instance "orcl1" atORACLE home "/u01/app/oracle/product/26.1.0/dbhome_1". Datapatchoutput: SQL Patching sanity checks version23.26.1.0.0 on Tue 05 May 2026 08:47:03 PM CST Log file for this invocation:/u01/app/oracle/cfgtoollogs/sqlpatch/sanity_checks_20260505_204703_284151/sanity_checks_20260505_204703_284151.log RAC detected, verifying SSH connection... Done Running checks for the provided DBorcl1:/u01/app/oracle/product/26.1.0/dbhome_1 Checks completed. Printing report: Check: Dictionary statistics gathering -WARNING Patching the database without recent data dictionary statistics gatheredmay 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; CDB$ROOT: | LATEST | OPERATION | STATUS | |-----------------+-------------------------+-----------| | 30-JAN-26 18:20 | gather_dictionary_stats | COMPLETED | |-----------------+-------------------------+-----------| 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 setfor successful execution of Queryable Patch Inventory. The following list shows the node(s) where environment variables LC_ALLand LC_CTYPE are not properly configured or cannot be determined. rac02: egrep: warning: egrep is obsolescent; using grep -E SQL Patching sanity checks completed onTue 05 May 2026 08:47:10 PM CST rac01: moving databases: "orcl"on nodes: "rac01" rac01: retrieving status of databases"orcl"... rac01: copying database configurationfiles from Oracle home "/u01/app/oracle/product/26.1.0/dbhome_1" toOracle home "/u01/app/oracle/product/26.2/dbhome_1" ... rac01: retrieving status of services ofdatabases "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 configurationfiles from Oracle home "/u01/app/oracle/product/26.1.0/dbhome_1" toOracle home "/u01/app/oracle/product/26.2/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 executionrequirement for database 'orcl' ... rac01: Datapatch executed succesfully forDB 'orcl' ... rac01: Checking datapatch executionrequirement for database 'orcl' ... rac01: Datapatch executed succesfully forDB 'orcl' ... rac01: Performing post-patch checks... rac01: Completed the 'move database'operation Databases moved from Oracle home"/u01/app/oracle/product/26.1.0/dbhome_1" to Oracle home"/u01/app/oracle/product/26.2/dbhome_1" : "orcl" 2.5 启用补丁 列出两阶段补丁 selectBUG_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; 2.6 验证数据库补丁 修改环境变量 vim.bash_profile ORACLE_HOME=newhome [oracle@rac02 OPatch]$ ./opatch lspatches 39093738;OCW RELEASE UPDATE 23.26.2.0.0 (39093738) Gold Image 39093711;Database Release Update : 23.26.2.0.0 (39093711) GoldImage OPatch succeeded. SQL> select banner from v$version; BANNER -------------------------------------------------------------------------------- Oracle AI Database 26ai Enterprise Edition Release 23.26.2.0.0 -Production SQL> SQL> selectPATCH_ID,PATCH_TYPE,DESCRIPTION,ACTION,ACTION_TIME,STATUS,TARGET_VERSION from dba_registry_sqlpatch; PATCH_ID PATCH_TYPEDESCRIPTION ACTION ACTION_TIME STATUS TARGET_VERSION ---------- ----------------------------------------------------------------------------------------------- ------------------------------ ---------------------------------------- 38743669 RU Database Release Update : 23.26.1.0.0(38743669) Gold Image APPLY 30-JAN-2606.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-2608.53.54.924308 PM SUCCESS 23.26.2.0.0 至此,26ai rac 补丁升级完毕。
|