1. Basic environment
Operating system: Windows 10 and Windows Server 2019 and above
Installation path: D:\Program Files\Oracle
Database: Oracle Database 11.2.0.4.0 64-bit
Instance name: orcl
Patch file:
serial number | file name | File description |
---|---|---|
1 | p6880880_112000_MSWIN-x86-64.zip | Used to upgrade OPatch |
2 | p31659823_112040_MSWIN-x86-64.zip | Main patch file |
3 | p31740195_112040_MSWIN-x86-64.zip | Used to upgrade OJVM |
2. Operation steps
1. Stop the instance service and monitoring service
net stop OracleServiceORCL
net stop OracleOraDb11g_home1TNSListener
2. Query OPatch version
D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\OPatch\opatch.bat version
3. If it does not meet your needs, upgrade OPatch
3.1. Backup: Rename D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\OPatch to D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\OPatch_old
3.2. Coverage: Unzip p6880880_112000_MSWIN-x86-64.zip and unzip OPatch to D:\Program Files\Oracle\product\11.2.0\dbhome_1
3.3. Recheck the version:
D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\OPatch\opatch.bat version
OPatch Version: 11.2.0.3.29
OPatch succeeded.
4. View historical patches:
D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\OPatch\opatch.bat lsinventory
5. Install patch
5.1, unzip p31659823_112040_MSWIN-x86-64.zip to the root directory of D drive.
5.2. Execute in the decompression path:
D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\OPatch\opatch.bat apply
The system starts to check compatibility, just follow the prompts.
5.3
. Manually start Oracle's instance service and monitoring service.
5.4. Check the patch installation status:
select to_char(t.action_time, 'yyyy-mm-dd HH24:mi:ss'), t.action, t.namespace
, t.version, t.id, t.bundle_series, t.comments
from dba_registry_history t
5.5. Update patch information: Execute the following command, wait for the command to execute and then exit, and re-query the patch installation status.
cd /d D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\RDBMS\ADMIN
sqlplus / as sysdba
startup force
@catbundle.sql PSU apply
6. Upgrade OJVM
6.1. Unzip p31740195_112040_MSWIN-x86-64.zip to disk D. cd /d D:\p31740195_112040_MSWIN-x86-64\
6.2. Check for conflicts:
D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\OPatch\opatch.bat prereq CheckConflictAgainstOHWithDetail -ph ./
6.3. Manually close instances, monitors, and services
6.4. Install patches:
D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\OPatch\opatch.bat apply
6.5. Check whether the installation is successful:
D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\OPatch\opatch.bat lspatches
31740195;WINDOWS ORACLE JAVAVM COMPONENT BUNDLE PATCH 11.2.0.4.201020
31659823;Windows Database Bundle Patch : 11.2.0.4.201020 (31659823)
6.6. Manually start the instance
net start OracleServiceORCL
6.7. Update patch information:
cd D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\sqlpatch\31740195
sqlplus / as sysdba
shutdown
startup upgrade
@postinstall.sql
startup force
6.8. Manually start the instance
net start OracleServiceORCL
6.9. Query the patch installation status:
select to_char(t.action_time, 'yyyy-mm-dd HH24:mi:ss'), t.action, t.namespace
, t.version, t.id, t.bundle_series, t.comments
from dba_registry_history t