RU19.21在rac下安装

-- Validation of Oracle Inventory
GI 和 Oracle用户下
$ /OPatch/opatch lsinventory -detail -oh

grid用户下

$ /u01/app/19.0.0/grid/OPatch/opatch lsinventory -detail -oh /u01/app/19.0.0/grid

oracle用户下

$ /u01/app/oracle/product/19.0.0/db_1/OPatch/opatch lsinventory -detail -oh /u01/app/oracle/product/19.0.0/db_1

-- Run OPatch Conflict Check

grid用户下

% /u01/app/19.0.0/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /psu/35642822/35643107
% /u01/app/19.0.0/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /psu/35642822/35655527
% /u01/app/19.0.0/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /psu/35642822/35652062
% /u01/app/19.0.0/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /psu/35642822/35553096
% /u01/app/19.0.0/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /psu/35642822/33575402

oracle用户下 

% /u01/app/oracle/product/19.0.0/db_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /psu/35642822/35643107
% /u01/app/oracle/product/19.0.0/db_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /psu/35642822/35655527

-- Run OPatch System Space Check

grid用户下:

cat /tmp/patch_list_gihome.txt
/psu/35642822/35643107
/psu/35642822/35655527
/psu/35642822/35652062
/psu/35642822/35553096
/psu/35642822/33575402


% /u01/app/19.0.0/grid/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt

oracle用户下:

cat /tmp/patch_list_dbhome.txt
/psu/35642822/35643107
/psu/35642822/35655527

% /u01/app/oracle/product/19.0.0/db_1/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_dbhome.txt

-- One-off Patch Conflict Detection and Resolution

#GRID_HOME/OPatch/opatchauto apply /35642822 -analyze

root用户下

/u01/app/19.0.0/grid/OPatch/opatchauto apply /psu/35642822 -analyze
-- OPatchAuto
To patch the Grid home and all Oracle RAC database homes of the same version:
# export PATH=$PATH:/OPatch
# opatchauto apply /35642822

root用户下

-- root用户下 

export PATH=$PATH:/u01/app/19.0.0/grid/OPatch
opatchauto apply /psu/35642822

-- datapatch 

./datapatch -verbose

--查看补丁

SQL> set linesize 200
SQL> select patch_id,patch_type,action,status,description from dba_registry_sqlpatch;

  PATCH_ID PATCH_TYPE ACTION          STATUS                    DESCRIPTION
---------- ---------- --------------- ------------------------- ----------------------------------------------------------------------------------------------------
  29517242 RU         APPLY           SUCCESS                   Database Release Update : 19.3.0.0.190416 (29517242)
  30869156 RU         APPLY           SUCCESS                   Database Release Update : 19.7.0.0.200414 (30869156)
  35042068 RU         APPLY           SUCCESS                   Database Release Update : 19.19.0.0.230418 (35042068)
  35320081 RU         APPLY           SUCCESS                   Database Release Update : 19.20.0.0.230718 (35320081)
  35643107 RU         APPLY           SUCCESS                   Database Release Update : 19.21.0.0.231017 (35643107)

SQL>

-- log

[root@node19c01 ~]# /u01/app/19.0.0/grid/OPatch/opatchauto apply /psu/35642822

OPatchauto session is initiated at Sat Nov  4 17:03:24 2023

System initialization log file is /u01/app/19.0.0/grid/cfgtoollogs/opatchautodb/systemconfig2023-11-04_05-03-31PM.log.

Session log file is /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/opatchauto2023-11-04_05-04-06PM.log
The id for this session is 7G8H

Executing OPatch prereq operations to verify patch applicability on home /u01/app/19.0.0/grid

Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/19.0.0/db_1
Patch applicability verified successfully on home /u01/app/19.0.0/grid

Patch applicability verified successfully on home /u01/app/oracle/product/19.0.0/db_1


Executing patch validation checks on home /u01/app/19.0.0/grid
Patch validation checks successfully completed on home /u01/app/19.0.0/grid


Verifying SQL patch applicability on home /u01/app/oracle/product/19.0.0/db_1
SQL patch applicability verified successfully on home /u01/app/oracle/product/19.0.0/db_1


Preparing to bring down database service on home /u01/app/oracle/product/19.0.0/db_1
Successfully prepared home /u01/app/oracle/product/19.0.0/db_1 to bring down database service


Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/19.0.0/grid
Prepatch operation log file location: /u01/app/grid/crsdata/node19c01/crsconfig/crs_prepatch_apply_inplace_node19c01_2023-11-04_05-25-17PM.log
CRS service brought down successfully on home /u01/app/19.0.0/grid


Start applying binary patch on home /u01/app/19.0.0/grid
Binary patch applied successfully on home /u01/app/19.0.0/grid


Performing postpatch operations on CRS - starting CRS service on home /u01/app/19.0.0/grid
Postpatch operation log file location: /u01/app/grid/crsdata/node19c01/crsconfig/crs_postpatch_apply_inplace_node19c01_2023-11-04_05-39-38PM.log
CRS service started successfully on home /u01/app/19.0.0/grid


Preparing home /u01/app/oracle/product/19.0.0/db_1 after database service restarted
No step execution required.........

OPatchAuto successful.

--------------------------------Summary--------------------------------

Patching is completed successfully. Please find the summary as follows:

Host:node19c01
RAC Home:/u01/app/oracle/product/19.0.0/db_1
Version:19.0.0.0.0
Summary:

==Following patches were SKIPPED:

Patch: /psu/35642822/35652062
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /psu/35642822/33575402
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /psu/35642822/35553096
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /psu/35642822/35655527
Log: /u01/app/oracle/product/19.0.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-11-04_17-04-49PM_1.log
Reason: /psu/35642822/35655527 is not required to be applied to oracle home /u01/app/oracle/product/19.0.0/db_1

Patch: /psu/35642822/35643107
Log: /u01/app/oracle/product/19.0.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-11-04_17-04-49PM_1.log
Reason: /psu/35642822/35643107 is not required to be applied to oracle home /u01/app/oracle/product/19.0.0/db_1


Host:node19c01
CRS Home:/u01/app/19.0.0/grid
Version:19.0.0.0.0
Summary:

==Following patches were SKIPPED:

Patch: /psu/35642822/33575402
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-11-04_17-04-49PM_1.log
Reason: /psu/35642822/33575402 is not required to be applied to oracle home /u01/app/19.0.0/grid

Patch: /psu/35642822/35553096
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-11-04_17-04-49PM_1.log
Reason: /psu/35642822/35553096 is not required to be applied to oracle home /u01/app/19.0.0/grid


==Following patches were SUCCESSFULLY applied:

Patch: /psu/35642822/35643107
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-11-04_17-27-27PM_1.log

Patch: /psu/35642822/35652062
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-11-04_17-27-27PM_1.log

Patch: /psu/35642822/35655527
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-11-04_17-27-27PM_1.log



OPatchauto session completed at Sat Nov  4 17:47:11 2023
Time taken to complete the session 43 minutes, 41 seconds
[root@node19c01 ~]#
[root@node19c02 35642822]# /u01/app/19.0.0/grid/OPatch/opatchauto apply /psu/35642822

OPatchauto session is initiated at Sat Nov  4 17:50:28 2023

System initialization log file is /u01/app/19.0.0/grid/cfgtoollogs/opatchautodb/systemconfig2023-11-04_05-50-36PM.log.

Session log file is /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/opatchauto2023-11-04_05-51-10PM.log
The id for this session is NDXE

Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/19.0.0/db_1

Executing OPatch prereq operations to verify patch applicability on home /u01/app/19.0.0/grid
Patch applicability verified successfully on home /u01/app/19.0.0/grid

Patch applicability verified successfully on home /u01/app/oracle/product/19.0.0/db_1


Executing patch validation checks on home /u01/app/19.0.0/grid
Patch validation checks successfully completed on home /u01/app/19.0.0/grid


Executing patch validation checks on home /u01/app/oracle/product/19.0.0/db_1
Patch validation checks successfully completed on home /u01/app/oracle/product/19.0.0/db_1


Verifying SQL patch applicability on home /u01/app/oracle/product/19.0.0/db_1
SQL patch applicability verified successfully on home /u01/app/oracle/product/19.0.0/db_1


Preparing to bring down database service on home /u01/app/oracle/product/19.0.0/db_1
Successfully prepared home /u01/app/oracle/product/19.0.0/db_1 to bring down database service


Performing prepatch operations on CRS - bringing down CRS service on home /u01/app/19.0.0/grid

Prepatch operation log file location: /u01/app/grid/crsdata/node19c02/crsconfig/crs_prepatch_apply_inplace_node19c02_2023-11-04_06-05-24PM.log
CRS service brought down successfully on home /u01/app/19.0.0/grid


Performing prepatch operation on home /u01/app/oracle/product/19.0.0/db_1
Prepatch operation completed successfully on home /u01/app/oracle/product/19.0.0/db_1


Start applying binary patch on home /u01/app/oracle/product/19.0.0/db_1
Binary patch applied successfully on home /u01/app/oracle/product/19.0.0/db_1


Performing postpatch operation on home /u01/app/oracle/product/19.0.0/db_1
Postpatch operation completed successfully on home /u01/app/oracle/product/19.0.0/db_1


Start applying binary patch on home /u01/app/19.0.0/grid
Binary patch applied successfully on home /u01/app/19.0.0/grid


Performing postpatch operations on CRS - starting CRS service on home /u01/app/19.0.0/grid
Postpatch operation log file location: /u01/app/grid/crsdata/node19c02/crsconfig/crs_postpatch_apply_inplace_node19c02_2023-11-04_09-26-20PM.log
CRS service started successfully on home /u01/app/19.0.0/grid


Preparing home /u01/app/oracle/product/19.0.0/db_1 after database service restarted
No step execution required.........


Trying to apply SQL patch on home /u01/app/oracle/product/19.0.0/db_1
No SQL patch operations are required on local node for this home

OPatchAuto successful.

--------------------------------Summary--------------------------------

Patching is completed successfully. Please find the summary as follows:

Host:node19c02
RAC Home:/u01/app/oracle/product/19.0.0/db_1
Version:19.0.0.0.0
Summary:

==Following patches were SKIPPED:

Patch: /psu/35642822/35652062
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /psu/35642822/33575402
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /psu/35642822/35553096
Reason: This patch is not applicable to this specified target type - "rac_database"


==Following patches were SUCCESSFULLY applied:

Patch: /psu/35642822/35643107
Log: /u01/app/oracle/product/19.0.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-11-04_20-58-23PM_1.log

Patch: /psu/35642822/35655527
Log: /u01/app/oracle/product/19.0.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2023-11-04_20-58-23PM_1.log


Host:node19c02
CRS Home:/u01/app/19.0.0/grid
Version:19.0.0.0.0
Summary:

==Following patches were SKIPPED:

Patch: /psu/35642822/33575402
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-11-04_17-51-47PM_1.log
Reason: /psu/35642822/33575402 is not required to be applied to oracle home /u01/app/19.0.0/grid

Patch: /psu/35642822/35553096
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-11-04_17-51-47PM_1.log
Reason: /psu/35642822/35553096 is not required to be applied to oracle home /u01/app/19.0.0/grid


==Following patches were SUCCESSFULLY applied:

Patch: /psu/35642822/35643107
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-11-04_21-14-03PM_1.log

Patch: /psu/35642822/35652062
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-11-04_21-14-03PM_1.log

Patch: /psu/35642822/35655527
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-11-04_21-14-03PM_1.log


Patching session reported following warning(s):
_________________________________________________

[WARNING] The database instance 'test2' from '/u01/app/oracle/product/19.0.0/db_1', in host'node19c02' is not running. SQL changes, if any,  will not be applied.
To apply. the SQL changes, bring up the database instance and run the command manually from any one node (run as oracle).
Refer to the readme to get the correct steps for applying the sql changes.




OPatchauto session completed at Sat Nov  4 21:34:26 2023
Time taken to complete the session 223 minutes, 51 seconds
[root@node19c02 35642822]#
[root@node19c02 35642822]#

-- 补充1 ,出现的错误,原因/psu目录下,存放补丁,权限问题。

Start applying binary patch on home /u01/app/19.0.0/grid
Failed while applying binary patches on home /u01/app/19.0.0/grid

Execution of [OPatchAutoBinaryAction] patch action failed, check log for more details. Failures:
Patch Target : node19c01->/u01/app/19.0.0/grid Type[crs]
Details: [
---------------------------Patching Failed---------------------------------
Command execution failed during patching in home: /u01/app/19.0.0/grid, host: node19c01.
Command failed:  /u01/app/19.0.0/grid/OPatch/opatchauto  apply /psu/35642822 -oh /u01/app/19.0.0/grid -target_type cluster -binary -invPtrLoc /u01/app/19.0.0/grid/oraInst.loc -jre /u01/app/19.0.0/grid/OPatch/jre -persistresult /u01/app/19.0.0/grid/opatchautocfg/db/sessioninfo/sessionresult_node19c01_crs_1.ser -analyzedresult /u01/app/19.0.0/grid/opatchautocfg/db/sessioninfo/sessionresult_analyze_node19c01_crs_1.ser
Command failure output:
==Following patches FAILED in apply:

Patch: /psu/35642822/35643107
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-11-04_15-57-02PM_1.log
Reason: Failed during Patching: oracle.opatch.opatchsdk.OPatchException:
Prerequisite check "CheckApplicable" failed.

Patch: /psu/35642822/35652062
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-11-04_15-57-02PM_1.log
Reason: Failed during Patching: oracle.opatch.opatchsdk.OPatchException:
Prerequisite check "CheckApplicable" failed.

Patch: /psu/35642822/35655527
Log: /u01/app/19.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2023-11-04_15-57-02PM_1.log
Reason: Failed during Patching: oracle.opatch.opatchsdk.OPatchException:
Prerequisite check "CheckApplicable" failed.

After fixing the cause of failure Run opatchauto resume

]
OPATCHAUTO-68061: The orchestration engine failed.
OPATCHAUTO-68061: The orchestration engine failed with return code 1
OPATCHAUTO-68061: Check the log for more details.
OPatchAuto failed.

OPatchauto session completed at Sat Nov  4 16:03:04 2023
Time taken to complete the session 37 minutes, 17 seconds

 opatchauto failed with error code 42
[root@node19c01 ~]#

详细的log ,提示无法copy,权限问题  

[Nov 4, 2023 4:03:03 PM] [INFO]     Patch 35655527:
                                    Copy Action: Source File "/psu/35642822/35655527/files/bin/ocrcheck.bin" does not exists or is not readable
                                    'oracle.has.crs, 19.0.0.0.0': Cannot copy file from 'ocrcheck.bin' to '/u01/app/19.0.0/grid/bin/ocrcheck.bin'
                                    Copy Action: Source File "/psu/35642822/35655527/files/bin/ocrconfig.bin" does not exists or is not readable
                                    'oracle.has.crs, 19.0.0.0.0': Cannot copy file from 'ocrconfig.bin' to '/u01/app/19.0.0/grid/bin/ocrconfig.bin'
[Nov 4, 2023 4:03:03 PM] [INFO]     Prerequisite check "CheckApplicable" failed.
                                    The details are:

-- 补充2 ,在dg下打补丁的时候,备份库上没有运行./datapatch -verbose的时候,发现布丁状态是end,运行完毕后,补丁状态是success 

SYS@test SQL> alter database recover managed standby database disconnect from session;

Database altered.

SYS@test SQL> set linesize 200
SYS@test SQL> select patch_id,patch_type,action,status,description from dba_registry_sqlpatch;

  PATCH_ID PATCH_TYPE ACTION          STATUS                    DESCRIPTION
---------- ---------- --------------- ------------------------- ----------------------------------------------------------------------------------------------------
  29517242 RU         APPLY           SUCCESS                   Database Release Update : 19.3.0.0.190416 (29517242)
  35042068 RU         APPLY           SUCCESS                   Database Release Update : 19.19.0.0.230418 (35042068)
  35320081 RU         APPLY           SUCCESS                   Database Release Update : 19.20.0.0.230718 (35320081)
  35643107 RU         APPLY           END                       Database Release Update : 19.21.0.0.231017 (35643107)

SYS@test SQL>
SYS@test SQL> /

  PATCH_ID PATCH_TYPE ACTION          STATUS                    DESCRIPTION
---------- ---------- --------------- ------------------------- ----------------------------------------------------------------------------------------------------
  29517242 RU         APPLY           SUCCESS                   Database Release Update : 19.3.0.0.190416 (29517242)
  35042068 RU         APPLY           SUCCESS                   Database Release Update : 19.19.0.0.230418 (35042068)
  35320081 RU         APPLY           SUCCESS                   Database Release Update : 19.20.0.0.230718 (35320081)
  35643107 RU         APPLY           SUCCESS                   Database Release Update : 19.21.0.0.231017 (35643107)

SYS@test SQL>

END

你可能感兴趣的:(Patches,oracle)