千家信息网

如何升级Oracle Database为Oracle Database 19.3?

发表于:2024-11-19 作者:千家信息网编辑
千家信息网最后更新 2024年11月19日,1. 背景介绍由于Oracle Database 19c会作为Oracle长期支持的版本,官方也建议大家选择19c这个版本。而最新推出的20c会作为一个全新的发布序列,当前版本是20.1,此版本的生命
千家信息网最后更新 2024年11月19日如何升级Oracle Database为Oracle Database 19.3?

1. 背景介绍
由于Oracle Database 19c会作为Oracle长期支持的版本,官方也建议大家选择19c这个版本。而最新推出的20c会作为一个全新的发布序列,当前版本是20.1,此版本的生命周期也会比较短,因此可以再观望一下20c的后续版本。我安装了在Oracle官网可以下载到的19.3的版本,完成了升级到19.6版本的操作过程,给此项目工作提供文档支持。

2. 升级过程
可以从MOS获得 Database 19.6 的 patch,名称如下:

Patch 30463595: COMBO OF OJVM RU COMPONENT 19.6.0.0.200114 DB RU 19.6.0.0.200114

安装Patch的时候,建议大家先阅读Patch中的README文档,文档中详细介绍了该patch的安装方法和其他使用方法等内容;由于Patch 30463595是两个补丁的合并,因此要分别安装其中的 30463595 和 30557433。

先检查当前Oracle数据库的补丁安装情况,使用opatch lsinv命令可以看到现在补丁是19.3的版本。

[oracle@sdedu 30463595]$ /u01/app/oracle/product/19.3.0/dbhome_1/OPatch/opatch lsinvOracle Interim Patch Installer version 12.2.0.1.17Copyright (c) 2020, Oracle Corporation. All rights reserved.Oracle Home : /u01/app/oracle/product/19.3.0/dbhome_1Central Inventory : /u01/app/oraInventoryfrom : /u01/app/oracle/product/19.3.0/dbhome_1/oraInst.locOPatch version : 12.2.0.1.17OUI version : 12.2.0.7.0Log file location : /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatch/opatch3020-03-03_11-01-49AM_1.logLsinventory Output file location : /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2020-03-03_11-01-49AM.txt---------------------------------------------------------------------------Local Machine Information::Hostname: sdedu.sandata.com.cnARU platform id: 226ARU platform description:: Linux x86-64Installed Top-level Products (1):Oracle Database 19c 19.0.0.0.0There are 1 products installed in this Oracle Home.Interim patches (2) :Patch 29585399 : applied on Thu Apr 18 15:21:33 CST 2019Unique Patch ID: 22840393Patch description: "OCW RELEASE UPDATE 19.3.0.0.0 (29585399)"Created on 9 Apr 2019, 19:12:47 hrs PST8PDTBugs fixed:27222128, 27572040, 27604329, 27760043, 27877830, 28302580, 2847067328621543, 28642469, 28699321, 28710663, 28755846, 28772816, 2878532128800508, 28808652, 28815557, 28847541, 28847572, 28870496, 2887104028874416, 28877252, 28881191, 28881848, 28888083, 28911140, 2892525028925460, 28935956, 28940472, 3, 28942694, 28951332, 28963036, 2896877928980448, 28995287, 29003207, 29003617, 29016294, 29018680, 2902487629026154, 29027933, 29047127, 29052850, 29058476, 29111631, 2911245529117337, 29123444, 29125708, 29125786, 29129476, 29131772, 2913245629139727, 29146157, 29147849, 29149170, 29152603, 29152752, 2915463129154636, 29154829, 29159216, 29159661, 29160462, 29161923, 2916954029169739, 29170717, 29173618, 29181568, 29182920, 29183298, 2918609129191827, 29201143, 29201695, 29209545, 29210577, 29210610, 2921062429210683, 29213641, 29219627, 29224294, 29225861, 29229839, 2923593429242906, 29243749, 29244495, 29244766, 29244968, 29248723, 2924958329251564, 29255616, 29260224, 29261695, 29271019, 29273360, 2928209029282666, 29285453, 29285621, 29290235, 29292232, 29293806, 2929475329299830, 29307090, 29307109, 29311336, 29329675, 29330791, 2933929929357821, 29360467, 29360775, 29367971, 29368725, 29379299, 2937938129380527, 29381000, 29382296, 29391301, 29393649, 29402110, 2941193129413360, 29457319, 29465047Patch 29517242 : applied on Thu Apr 18 15:21:17 CST 2019Unique Patch ID: 22862832Patch description: "Database Release Update : 19.3.0.0.190416 (29517242)"Created on 17 Apr 2019, 23:27:10 hrs PST8PDTBugs fixed:29515240, 14735102, 19697993, 20313356, 21965541, 25806201, 2588317925986062, 26476244, 26611353, 26872233, 27369515, 27423500, 2766631227710072, 27846298, 27957203, 28064977, 28072567, 28129791, 2818102128210681, 28279456, 28313275, 28350595, 28371123, 28379065, 2843144528463226, 28489419, 28502773, 28513333, 28534475, 28561704, 2856989728572533, 28572544, 28587723, 28593682, 28594086, 28597221, 2860195728605066, 28606598, 28625862, 28627033, 28636532, 28643718, 2864454928645570, 28646200, 28646939, 28649388, 28655209, 28663782, 2867394528692275, 28694872, 28696373, 28705231, 28710385, 28710734, 2871446128718469, 28730079, 28740708, 28760206, 28772390, 28774416, 2877721428789531, 28791852, 28795551, 28802734, 28804517, 28810381, 2881156028815123, 28815355, 28819640, 28824482, 28833912, 28835937, 2886253228863432, 28873575, 28876253, 28876639, 28884931, 28888327, 2889279428897512, 28899663, 28901126, 28905457, 28907196, 28912691, 2891556128917080, 28918429, 28919145, 28922227, 28922532, 28922608, 2892563428925880, 28933158, 28936114, 28937717, 28938698, 28940179, 2894028128941901, 28942455, 28945421, 28945994, 28951533, 28952168, 2895476228955606, 28957292, 28957723, 28962775, 28965231, 28966444, 2897408328977322, 28983095, 28983486, 28986326, 28986481, 28988482, 2898930628993295, 28994307, 28996376, 29000000, 29001888, 29002927, 2900373829006318, 29006621, 29007321, 29007775, 29008035, 29011936, 2901347529014076, 29015118, 29017265, 29018655, 29019121, 29021063, 2902135229024552, 29026582, 29026606, 29027456, 29027694, 29027940, 2903157529031600, 29032234, 29032457, 29032607, 29033052, 29033145, 2903320029033280, 29034587, 29037290, 29038528, 29039089, 29039510, 2904355429043651, 29043725, 29044763, 29044954, 29047850, 29048289, 2904849829048605, 29050560, 29050765, 29051702, 29052726, 29053783, 2905602429056270, 29056560, 29059011, 29061959, 29062692, 29062848, 2906286029062868, 29110526, 29110783, 29110790, 29110797, 29110802, 2911080529111598, 29113282, 29113305, 29117526, 29117642, 29119077, 2912022329122224, 29122254, 29123297, 29123432, 29123482, 29124368, 2912538029126345, 29127957, 29128935, 29129450, 29129497, 29129712, 2913021929131539, 29132938, 29134447, 29136111, 29138641, 29141316, 2914134129141685, 29142667, 29144995, 29145214, 29145730, 29149829, 2915033829151520, 29152357, 29155099, 29157389, 29158680, 29158899, 2915990929159936, 29160174, 29162095, 29163415, 29163437, 29163524, 2916356729167111, 29167342, 29167374, 29167940, 29168219, 29168433, 2916907329169215, 29171942, 29172618, 29172826, 29173140, 29173373, 2917381729174004, 29176318, 29177466, 29177543, 29177886, 29178385, 2918031329180455, 29180559, 29180893, 29181153, 29181231, 29181620, 2918174329181923, 29182019, 29183912, 29184297, 29184666, 29185193, 2918645629189302, 29189307, 29189889, 29190235, 29190474, 29190740, 2919154129192419, 29192468, 29192685, 29193207, 29194205, 29194367, 2919449329194827, 29195279, 29195337, 29195758, 29196725, 29199635, 2919973329200316, 29200700, 29201494, 29201539, 29202104, 29202850, 2920312229203166, 29203425, 29203443, 29203604, 29205281, 29205323, 2920541929205463, 29205767, 29205918, 29206109, 29206605, 29207073, 2920826029208732, 29211457, 29211724, 29212012, 29212433, 29212611, 2921335129213775, 29213850, 29213879, 29214561, 29214960, 29216746, 2921698429217294, 29217472, 29217828, 29217848, 29218570, 29219205, 2921927329220079, 29221248, 29221891, 29222031, 29222784, 29223833, 2922385929223967, 29224065, 29224605, 29225076, 29227602, 29228869, 2922916429229754, 29229844, 29229955, 29230252, 29230565, 29231133, 2923211729232154, 29234123, 29237538, 29240307, 29241345, 29242017, 2924288429243958, 29245137, 29245160, 29246163, 29247415, 29247712, 2924790629248552, 29248835, 29248858, 29249991, 29250059, 29251259, 2925318429253871, 29254031, 29254930, 29255178, 29255273, 29255431, 2925543529256426, 29259119, 29259320, 29261906, 29262512, 29262887, 2926544829266248, 29266899, 29267292, 29268412, 29269171, 29270585, 2927353929273735, 29273847, 29274428, 29274564, 29274627, 29275461, 2927821829279658, 29279751, 29279854, 29282898, 29285503, 29285788, 2928595629286037, 29287130, 29287705, 29292837, 29293072, 29297863, 2929791529298220, 29299049, 29299082, 29299844, 29301566, 29302963, 2930391829304781, 29311588, 29312310, 29312734, 29312753, 29313347, 2931341729313525, 29314539, 29318410, 29319441, 29321489, 29323946, 2932456829325087, 29325105, 29325257, 29325993, 29327044, 29329087, 2933120929331380, 29331493, 29332771, 29333500, 29337310, 29338315, 2933845329338780, 29338913, 29339155, 29341209, 29343086, 29346943, 2934762029348176, 29350052, 29351386, 29351716, 29351749, 29352867, 2935327129355654, 29356547, 29356752, 29358828, 29360672, 29361801, 2936315129364171, 29364177, 29367019, 29367561, 29368253, 29373418, 2937358829374179, 29377986, 29378029, 29379978, 29382784, 29385652, 2938650229386635, 29386660, 29387274, 29388094, 29388524, 29388830, 2938988929390435, 29394140, 29394749, 29397954, 29398863, 29399100, 2939912129405012, 29405651, 29412066, 29412269, 29417884, 29423826, 2942926429429566, 29431485, 29435652, 29438736, 29439522, 29450421, 2945138629452576, 29452953, 29457807, 29460252, 29462957, 29486181, 2950761629521748, 29530812, 29531654, 29557336, 29558975, 29601461---------------------------------------------------------------------------OPatch succeeded.

然后进入补丁目录30484981;

[oracle@sdedu 30463595]$ cd 30484981/[oracle@sdedu 30484981]$ lsetc files README.html README.txt

查看要安装的补丁和现有补丁是否存在冲突;

[oracle@sdedu 30484981]$ /u01/app/oracle/product/19.3.0/dbhome_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./Oracle Interim Patch Installer version 12.2.0.1.17Copyright (c) 2020, Oracle Corporation. All rights reserved.PREREQ sessionOracle Home : /u01/app/oracle/product/19.3.0/dbhome_1Central Inventory : /u01/app/oraInventoryfrom : /u01/app/oracle/product/19.3.0/dbhome_1/oraInst.locOPatch version : 12.2.0.1.17OUI version : 12.2.0.7.0Log file location : /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatch/opatch3020-03-03_11-00-59AM_1.logInvoking prereq "checkconflictagainstohwithdetail"Prereq "checkConflictAgainstOHWithDetail" passed.OPatch succeeded.

使用opatch apply命令开始应用 30484981补丁

[oracle@sdedu 30484981]$ /u01/app/oracle/product/19.3.0/dbhome_1/OPatch/opatch applyOracle Interim Patch Installer version 12.2.0.1.17Copyright (c) 2020, Oracle Corporation. All rights reserved.Oracle Home : /u01/app/oracle/product/19.3.0/dbhome_1Central Inventory : /u01/app/oraInventoryfrom : /u01/app/oracle/product/19.3.0/dbhome_1/oraInst.locOPatch version : 12.2.0.1.17OUI version : 12.2.0.7.0Log file location : /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatch/opatch3020-03-03_11-14-00AM_1.logVerifying environment and performing prerequisite checks...OPatch continues with these patches: 30484981Do you want to proceed? [y|n]yUser Responded with: YAll checks passed.Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.(Oracle Home = '/u01/app/oracle/product/19.3.0/dbhome_1')Is the local system ready for patching? [y|n]yUser Responded with: YBacking up files...Applying interim patch '30484981' to OH '/u01/app/oracle/product/19.3.0/dbhome_1'Patching component oracle.javavm.server, 19.0.0.0.0...Patching component oracle.javavm.server.core, 19.0.0.0.0...Patching component oracle.rdbms.dbscripts, 19.0.0.0.0...Patching component oracle.rdbms, 19.0.0.0.0...Patch 30484981 successfully applied.Log file location: /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatch/opatch3020-03-03_11-14-00AM_1.logOPatch succeeded.

安装完成后,再次检查补丁的列表,可以看到JVM 19.6的补丁已经安装好:

[oracle@sdedu 30484981]$ /u01/app/oracle/product/19.3.0/dbhome_1/OPatch/opatch lsinvOracle Interim Patch Installer version 12.2.0.1.17Copyright (c) 2020, Oracle Corporation. All rights reserved.Oracle Home : /u01/app/oracle/product/19.3.0/dbhome_1Central Inventory : /u01/app/oraInventoryfrom : /u01/app/oracle/product/19.3.0/dbhome_1/oraInst.locOPatch version : 12.2.0.1.17OUI version : 12.2.0.7.0Log file location : /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatch/opatch3020-03-03_11-48-05AM_1.logLsinventory Output file location : /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2020-03-03_11-48-05AM.txt--------------------------------------------------------------------------------Local Machine Information::Hostname: sdedu.sandata.com.cnARU platform id: 226ARU platform description:: Linux x86-64Installed Top-level Products (1):Oracle Database 19c 19.0.0.0.0There are 1 products installed in this Oracle Home.Interim patches (3) :Patch 30484981 : applied on Tue Mar 03 11:14:31 CST 2020Unique Patch ID: 23248235Patch description: "OJVM RELEASE UPDATE: 19.6.0.0.200114 (30484981)"Created on 5 Dec 2019, 05:10:10 hrs PST8PDTBugs fixed:29540327, 29254623, 29445548, 29774362, 30134746, 30160625, 2994227530534662, 29512125Patch 29585399 : applied on Thu Apr 18 15:21:33 CST 2019Unique Patch ID: 22840393Patch description: "OCW RELEASE UPDATE 19.3.0.0.0 (29585399)"Created on 9 Apr 2019, 19:12:47 hrs PST8PDTBugs fixed:27222128, 27572040, 27604329, 27760043, 27877830, 28302580, 2847067328621543, 28642469, 28699321, 28710663, 28755846, 28772816, 2878532128800508, 28808652, 28815557, 28847541, 28847572, 28870496, 2887104028874416, 28877252, 28881191, 28881848, 28888083, 28911140, 2892525028925460, 28935956, 28940472, 3, 28942694, 28951332, 28963036, 2896877928980448, 28995287, 29003207, 29003617, 29016294, 29018680, 2902487629026154, 29027933, 29047127, 29052850, 29058476, 29111631, 2911245529117337, 29123444, 29125708, 29125786, 29129476, 29131772, 2913245629139727, 29146157, 29147849, 29149170, 29152603, 29152752, 2915463129154636, 29154829, 29159216, 29159661, 29160462, 29161923, 2916954029169739, 29170717, 29173618, 29181568, 29182920, 29183298, 2918609129191827, 29201143, 29201695, 29209545, 29210577, 29210610, 2921062429210683, 29213641, 29219627, 29224294, 29225861, 29229839, 2923593429242906, 29243749, 29244495, 29244766, 29244968, 29248723, 2924958329251564, 29255616, 29260224, 29261695, 29271019, 29273360, 2928209029282666, 29285453, 29285621, 29290235, 29292232, 29293806, 2929475329299830, 29307090, 29307109, 29311336, 29329675, 29330791, 2933929929357821, 29360467, 29360775, 29367971, 29368725, 29379299, 2937938129380527, 29381000, 29382296, 29391301, 29393649, 29402110, 2941193129413360, 29457319, 29465047Patch 29517242 : applied on Thu Apr 18 15:21:17 CST 2019Unique Patch ID: 22862832Patch description: "Database Release Update : 19.3.0.0.190416 (29517242)"Created on 17 Apr 2019, 23:27:10 hrs PST8PDTBugs fixed:29515240, 14735102, 19697993, 20313356, 21965541, 25806201, 2588317925986062, 26476244, 26611353, 26872233, 27369515, 27423500, 2766631227710072, 27846298, 27957203, 28064977, 28072567, 28129791, 2818102128210681, 28279456, 28313275, 28350595, 28371123, 28379065, 2843144528463226, 28489419, 28502773, 28513333, 28534475, 28561704, 2856989728572533, 28572544, 28587723, 28593682, 28594086, 28597221, 2860195728605066, 28606598, 28625862, 28627033, 28636532, 28643718, 2864454928645570, 28646200, 28646939, 28649388, 28655209, 28663782, 2867394528692275, 28694872, 28696373, 28705231, 28710385, 28710734, 2871446128718469, 28730079, 28740708, 28760206, 28772390, 28774416, 2877721428789531, 28791852, 28795551, 28802734, 28804517, 28810381, 2881156028815123, 28815355, 28819640, 28824482, 28833912, 28835937, 2886253228863432, 28873575, 28876253, 28876639, 28884931, 28888327, 2889279428897512, 28899663, 28901126, 28905457, 28907196, 28912691, 2891556128917080, 28918429, 28919145, 28922227, 28922532, 28922608, 2892563428925880, 28933158, 28936114, 28937717, 28938698, 28940179, 2894028128941901, 28942455, 28945421, 28945994, 28951533, 28952168, 2895476228955606, 28957292, 28957723, 28962775, 28965231, 28966444, 2897408328977322, 28983095, 28983486, 28986326, 28986481, 28988482, 2898930628993295, 28994307, 28996376, 29000000, 29001888, 29002927, 2900373829006318, 29006621, 29007321, 29007775, 29008035, 29011936, 2901347529014076, 29015118, 29017265, 29018655, 29019121, 29021063, 2902135229024552, 29026582, 29026606, 29027456, 29027694, 29027940, 2903157529031600, 29032234, 29032457, 29032607, 29033052, 29033145, 2903320029033280, 29034587, 29037290, 29038528, 29039089, 29039510, 2904355429043651, 29043725, 29044763, 29044954, 29047850, 29048289, 2904849829048605, 29050560, 29050765, 29051702, 29052726, 29053783, 2905602429056270, 29056560, 29059011, 29061959, 29062692, 29062848, 2906286029062868, 29110526, 29110783, 29110790, 29110797, 29110802, 2911080529111598, 29113282, 29113305, 29117526, 29117642, 29119077, 2912022329122224, 29122254, 29123297, 29123432, 29123482, 29124368, 2912538029126345, 29127957, 29128935, 29129450, 29129497, 29129712, 2913021929131539, 29132938, 29134447, 29136111, 29138641, 29141316, 2914134129141685, 29142667, 29144995, 29145214, 29145730, 29149829, 2915033829151520, 29152357, 29155099, 29157389, 29158680, 29158899, 2915990929159936, 29160174, 29162095, 29163415, 29163437, 29163524, 2916356729167111, 29167342, 29167374, 29167940, 29168219, 29168433, 2916907329169215, 29171942, 29172618, 29172826, 29173140, 29173373, 2917381729174004, 29176318, 29177466, 29177543, 29177886, 29178385, 2918031329180455, 29180559, 29180893, 29181153, 29181231, 29181620, 2918174329181923, 29182019, 29183912, 29184297, 29184666, 29185193, 2918645629189302, 29189307, 29189889, 29190235, 29190474, 29190740, 2919154129192419, 29192468, 29192685, 29193207, 29194205, 29194367, 2919449329194827, 29195279, 29195337, 29195758, 29196725, 29199635, 2919973329200316, 29200700, 29201494, 29201539, 29202104, 29202850, 2920312229203166, 29203425, 29203443, 29203604, 29205281, 29205323, 2920541929205463, 29205767, 29205918, 29206109, 29206605, 29207073, 2920826029208732, 29211457, 29211724, 29212012, 29212433, 29212611, 2921335129213775, 29213850, 29213879, 29214561, 29214960, 29216746, 2921698429217294, 29217472, 29217828, 29217848, 29218570, 29219205, 2921927329220079, 29221248, 29221891, 29222031, 29222784, 29223833, 2922385929223967, 29224065, 29224605, 29225076, 29227602, 29228869, 2922916429229754, 29229844, 29229955, 29230252, 29230565, 29231133, 2923211729232154, 29234123, 29237538, 29240307, 29241345, 29242017, 2924288429243958, 29245137, 29245160, 29246163, 29247415, 29247712, 2924790629248552, 29248835, 29248858, 29249991, 29250059, 29251259, 2925318429253871, 29254031, 29254930, 29255178, 29255273, 29255431, 2925543529256426, 29259119, 29259320, 29261906, 29262512, 29262887, 2926544829266248, 29266899, 29267292, 29268412, 29269171, 29270585, 2927353929273735, 29273847, 29274428, 29274564, 29274627, 29275461, 2927821829279658, 29279751, 29279854, 29282898, 29285503, 29285788, 2928595629286037, 29287130, 29287705, 29292837, 29293072, 29297863, 2929791529298220, 29299049, 29299082, 29299844, 29301566, 29302963, 2930391829304781, 29311588, 29312310, 29312734, 29312753, 29313347, 2931341729313525, 29314539, 29318410, 29319441, 29321489, 29323946, 2932456829325087, 29325105, 29325257, 29325993, 29327044, 29329087, 2933120929331380, 29331493, 29332771, 29333500, 29337310, 29338315, 2933845329338780, 29338913, 29339155, 29341209, 29343086, 29346943, 2934762029348176, 29350052, 29351386, 29351716, 29351749, 29352867, 2935327129355654, 29356547, 29356752, 29358828, 29360672, 29361801, 2936315129364171, 29364177, 29367019, 29367561, 29368253, 29373418, 2937358829374179, 29377986, 29378029, 29379978, 29382784, 29385652, 2938650229386635, 29386660, 29387274, 29388094, 29388524, 29388830, 2938988929390435, 29394140, 29394749, 29397954, 29398863, 29399100, 2939912129405012, 29405651, 29412066, 29412269, 29417884, 29423826, 2942926429429566, 29431485, 29435652, 29438736, 29439522, 29450421, 2945138629452576, 29452953, 29457807, 29460252, 29462957, 29486181, 2950761629521748, 29530812, 29531654, 29557336, 29558975, 29601461---------------------------------------------------------------------------OPatch succeeded.

接下来,关闭数据库后使用datapatch工具在数据库中应用SQL文件;

[oracle@sdedu ~]$ sqlplus / as sysdbaSQL*Plus: Release 19.0.0.0.0 - Production on Tue Mar 3 13:59:56 2020Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle. All rights reserved.Connected to an idle instance.SQL> startup upgradeORACLE instance started.Total System Global Area 1543500832 bytesFixed Size 9135136 bytesVariable Size 973078528 bytesDatabase Buffers 553648128 bytesRedo Buffers 7639040 bytesDatabase mounted.Database opened.SQL> alter pluggable database all open upgrade;Pluggable database altered.SQL> quitDisconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - ProductionVersion 19.3.0.0.0[oracle@sdedu ~]$ cd $ORACLE_HOME/OPatch[oracle@sdedu OPatch]$ ./datapatch -verboseSQL Patching tool version 19.3.0.0.0 Production on Tue Mar 3 14:02:02 2020Copyright (c) 2012, 2019, Oracle. All rights reserved.Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_23535_2020_03_03_14_02_02/sqlpatch_invocation.logConnecting to database...OKGathering database info...doneNote: Datapatch will only apply or rollback SQL fixes for PDBsthat are in an open state, no patches will be applied to closed PDBs.Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation(Doc ID 1585822.1)Bootstrapping registry and package to current versions...doneDetermining current state...doneCurrent state of interim SQL patches:Interim patch 30484981 (OJVM RELEASE UPDATE: 19.6.0.0.200114 (30484981)):Binary registry: InstalledPDB CDB$ROOT: Not installedPDB PDB$SEED: Not installedPDB PDB1: Not installedCurrent state of release update SQL patches:Binary registry:19.3.0.0.0 Release_Update 190410122720: InstalledPDB CDB$ROOT:Applied 19.3.0.0.0 Release_Update 190410122720 successfully on 13-MAY-19 11.43.02.621425 PMPDB PDB$SEED:Applied 19.3.0.0.0 Release_Update 190410122720 successfully on 13-MAY-19 11.43.08.787211 PMPDB PDB1:Applied 19.3.0.0.0 Release_Update 190410122720 successfully on 13-MAY-19 11.43.08.787211 PMAdding patches to installation queue and performing prereq checks...doneInstallation queue:For the following PDBs: CDB$ROOT PDB$SEED PDB1No interim patches need to be rolled backNo release update patches need to be installedThe following interim patches will be applied:30484981 (OJVM RELEASE UPDATE: 19.6.0.0.200114 (30484981))Installing patches...Patch installation complete. Total patches installed: 3Validating logfiles...donePatch 30484981 apply (pdb CDB$ROOT): SUCCESSlogfile: /u01/app/oracle/cfgtoollogs/sqlpatch/30484981/23248235/30484981_apply_SS19C_CDBROOT_2020Mar03_14_02_48.log (no errors)Patch 30484981 apply (pdb PDB$SEED): SUCCESSlogfile: /u01/app/oracle/cfgtoollogs/sqlpatch/30484981/23248235/30484981_apply_SS19C_PDBSEED_2020Mar03_14_04_27.log (no errors)Patch 30484981 apply (pdb PDB1): SUCCESSlogfile: /u01/app/oracle/cfgtoollogs/sqlpatch/30484981/23248235/30484981_apply_SS19C_PDB1_2020Mar03_14_04_27.log (no errors)SQL Patching tool complete on Tue Mar 3 14:05:01 2020

最后,使用utlrp脚本来重新编译失败的对象;

[oracle@sdedu 30484981]$ sqlplus / as sysdbaSQL*Plus: Release 19.0.0.0.0 - Production on Tue Mar 3 11:43:20 2020Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle. All rights reserved.Connected to:Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - ProductionVersion 19.3.0.0.0SQL> select PATCH_ID,PATCH_TYPE,ACTION,STATUS,SOURCE_VERSION from dba_registry_sqlpatch;PATCH_ID PATCH_TYPE ACTION STATUS SOURCE_VERSION---------- ---------- ------------ ------------------- ---------------29517242 RU APPLY SUCCESS 19.1.0.0.030484981 INTERIM APPLY SUCCESS 19.3.0.0.0SQL> @?/rdbms/admin/utlrpSession altered.TIMESTAMP--------------------------------------------------------------------------------COMP_TIMESTAMP UTLRP_BGN 2020-03-03 11:44:52DOC> The following PL/SQL block invokes UTL_RECOMP to recompile invalidDOC> objects in the database. Recompilation time is proportional to theDOC> number of invalid objects in the database, so this command may takeDOC> a long time to execute on a database with a large number of invalidDOC> objects.DOC>DOC> Use the following queries to track recompilation progress:DOC>DOC> 1. Query returning the number of invalid objects remaining. ThisDOC> number should decrease with time.DOC> SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);DOC>DOC> 2. Query returning the number of objects compiled so far. This numberDOC> should increase with time.DOC> SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;DOC>DOC> This script automatically chooses serial or parallel recompilationDOC> based on the number of CPUs available (parameter cpu_count) multipliedDOC> by the number of threads per CPU (parameter parallel_threads_per_cpu).DOC> On RAC, this number is added across all RAC nodes.DOC>DOC> UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallelDOC> recompilation. Jobs are created without instance affinity so that theyDOC> can migrate across RAC nodes. Use the following queries to verifyDOC> whether UTL_RECOMP jobs are being created and run correctly:DOC>DOC> 1. Query showing jobs created by UTL_RECOMPDOC> SELECT job_name FROM dba_scheduler_jobsDOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%';DOC>DOC> 2. Query showing UTL_RECOMP jobs that are runningDOC> SELECT job_name FROM dba_scheduler_running_jobsDOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%';DOC>#PL/SQL procedure successfully completed.TIMESTAMP--------------------------------------------------------------------------------COMP_TIMESTAMP UTLRP_END 2020-03-03 11:44:55DOC> The following query reports the number of invalid objects.DOC>DOC> If the number is higher than expected, please examine the errorDOC> messages reported with each object (using SHOW ERRORS) to see if theyDOC> point to system misconfiguration or resource constraints that must beDOC> fixed before attempting to recompile these objects.DOC>#OBJECTS WITH ERRORS-------------------0DOC> The following query reports the number of exceptions caught duringDOC> recompilation. If this number is non-zero, please query the errorDOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errorsDOC> are due to misconfiguration or resource constraints that must beDOC> fixed before objects can compile successfully.DOC> Note: Typical compilation errors (due to coding errors) are notDOC> logged into this table: they go into DBA_ERRORS instead.DOC>#ERRORS DURING RECOMPILATION---------------------------0Function created.PL/SQL procedure successfully completed.Function dropped.PL/SQL procedure successfully completed.

至此,30484981补丁已经安装完毕。

下一步,就要来安装30557433补丁,整个过程和之前的安装过程类似,首先检查补丁是否存在冲突;

[oracle@sdedu 30463595]$ cd 30557433/[oracle@sdedu 30557433]$ lscustom etc files README.html README.txt[oracle@sdedu 30557433]$ /u01/app/oracle/product/19.3.0/dbhome_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./Oracle Interim Patch Installer version 12.2.0.1.17Copyright (c) 2020, Oracle Corporation. All rights reserved.PREREQ sessionOracle Home : /u01/app/oracle/product/19.3.0/dbhome_1Central Inventory : /u01/app/oraInventoryfrom : /u01/app/oracle/product/19.3.0/dbhome_1/oraInst.locOPatch version : 12.2.0.1.17OUI version : 12.2.0.7.0Log file location : /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatch/opatch3020-03-03_14-43-18PM_1.logInvoking prereq "checkconflictagainstohwithdetail"Prereq "checkConflictAgainstOHWithDetail" passed.OPatch succeeded.

接下来开始应用补丁;

[oracle@sdedu 30557433]$ /u01/app/oracle/product/19.3.0/dbhome_1/OPatch/opatch applyOracle Interim Patch Installer version 12.2.0.1.17Copyright (c) 2020, Oracle Corporation. All rights reserved.Oracle Home : /u01/app/oracle/product/19.3.0/dbhome_1Central Inventory : /u01/app/oraInventoryfrom : /u01/app/oracle/product/19.3.0/dbhome_1/oraInst.locOPatch version : 12.2.0.1.17OUI version : 12.2.0.7.0Log file location : /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatch/opatch3020-03-03_14-44-12PM_1.logVerifying environment and performing prerequisite checks...Prerequisite check "CheckActiveFilesAndExecutables" failed.The details are:Following active executables are not used by opatch process :/u01/app/oracle/product/19.3.0/dbhome_1/bin/oracleFollowing active executables are used by opatch process :/u01/app/oracle/product/19.3.0/dbhome_1/lib/libclntsh.so.19.1/u01/app/oracle/product/19.3.0/dbhome_1/lib/libsqlplus.soUtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.Log file location: /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatch/opatch3020-03-03_14-44-12PM_1.logOPatch failed with error code 73[oracle@sdedu 30557433]$ /u01/app/oracle/product/19.3.0/dbhome_1/OPatch/opatch applyOracle Interim Patch Installer version 12.2.0.1.17Copyright (c) 2020, Oracle Corporation. All rights reserved.Oracle Home : /u01/app/oracle/product/19.3.0/dbhome_1Central Inventory : /u01/app/oraInventoryfrom : /u01/app/oracle/product/19.3.0/dbhome_1/oraInst.locOPatch version : 12.2.0.1.17OUI version : 12.2.0.7.0Log file location : /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatch/opatch3020-03-03_14-46-05PM_1.logVerifying environment and performing prerequisite checks...--------------------------------------------------------------------------------Start OOP by Prereq process.Launch OOP...Oracle Interim Patch Installer version 12.2.0.1.17Copyright (c) 2020, Oracle Corporation. All rights reserved.Oracle Home : /u01/app/oracle/product/19.3.0/dbhome_1Central Inventory : /u01/app/oraInventoryfrom : /u01/app/oracle/product/19.3.0/dbhome_1/oraInst.locOPatch version : 12.2.0.1.17OUI version : 12.2.0.7.0Log file location : /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatch/opatch3020-03-03_14-46-35PM_1.logVerifying environment and performing prerequisite checks...OPatch continues with these patches: 30557433Do you want to proceed? [y|n]Y (auto-answered by -silent)User Responded with: YAll checks passed.Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.(Oracle Home = '/u01/app/oracle/product/19.3.0/dbhome_1')Is the local system ready for patching? [y|n]Y (auto-answered by -silent)User Responded with: YBacking up files...Applying interim patch '30557433' to OH '/u01/app/oracle/product/19.3.0/dbhome_1'ApplySession: Optional component(s) [ oracle.network.gsm, 19.0.0.0.0 ] , [ oracle.rdbms.ic, 19.0.0.0.0 ] , [ oracle.xdk.parser.java.jaxb2, 19.0.0.0.0 ] , [ oracle.assistants.asm, 19.0.0.0.0 ] , [ oracle.tfa, 19.0.0.0.0 ] , [ oracle.network.cman, 19.0.0.0.0 ] , [ oracle.oraolap.mgmt, 19.0.0.0.0 ] , [ oracle.assistants.usm, 19.0.0.0.0 ] , [ oracle.net.cman, 19.0.0.0.0 ] , [ oracle.options.olap.awm, 19.0.0.0.0 ] , [ oracle.jdk, 1.8.0.191.0 ] not present in the Oracle Home or a higher version is found.Patching component oracle.rdbms.rsf, 19.0.0.0.0...Patching component oracle.rdbms.util, 19.0.0.0.0...Patching component oracle.rdbms, 19.0.0.0.0...Patching component oracle.assistants.acf, 19.0.0.0.0...Patching component oracle.assistants.deconfig, 19.0.0.0.0...Patching component oracle.assistants.server, 19.0.0.0.0...Patching component oracle.buildtools.rsf, 19.0.0.0.0...Patching component oracle.ctx, 19.0.0.0.0...Patching component oracle.ldap.rsf, 19.0.0.0.0...Patching component oracle.network.rsf, 19.0.0.0.0...Patching component oracle.rdbms.dbscripts, 19.0.0.0.0...Patching component oracle.sdo, 19.0.0.0.0...Patching component oracle.sqlplus, 19.0.0.0.0...Patching component oracle.xdk.rsf, 19.0.0.0.0...Patching component oracle.rdbms.install.plugins, 19.0.0.0.0...Patching component oracle.rdbms.install.common, 19.0.0.0.0...Patching component oracle.odbc, 19.0.0.0.0...Patching component oracle.ovm, 19.0.0.0.0...Patching component oracle.rdbms.deconfig, 19.0.0.0.0...Patching component oracle.rdbms.dv, 19.0.0.0.0...Patching component oracle.sqlplus.ic, 19.0.0.0.0...Patching component oracle.ldap.security.osdt, 19.0.0.0.0...Patching component oracle.rdbms.oci, 19.0.0.0.0...Patching component oracle.oracore.rsf, 19.0.0.0.0...Patching component oracle.sdo.locator.jrf, 19.0.0.0.0...Patching component oracle.network.listener, 19.0.0.0.0...Patching component oracle.ldap.owm, 19.0.0.0.0...Patching component oracle.nlsrtl.rsf, 19.0.0.0.0...Patching component oracle.oraolap.dbscripts, 19.0.0.0.0...Patching component oracle.rdbms.scheduler, 19.0.0.0.0...Patching component oracle.install.deinstalltool, 19.0.0.0.0...Patching component oracle.dbjava.ucp, 19.0.0.0.0...Patching component oracle.sdo.locator, 19.0.0.0.0...Patching component oracle.network.client, 19.0.0.0.0...Patching component oracle.rdbms.rman, 19.0.0.0.0...Patching component oracle.rdbms.drdaas, 19.0.0.0.0...Patching component oracle.rdbms.crs, 19.0.0.0.0...Patching component oracle.duma, 19.0.0.0.0...Patching component oracle.precomp.rsf, 19.0.0.0.0...Patching component oracle.javavm.client, 19.0.0.0.0...Patching component oracle.precomp.common.core, 19.0.0.0.0...Patching component oracle.dbjava.jdbc, 19.0.0.0.0...Patching component oracle.dbjava.ic, 19.0.0.0.0...Patching component oracle.ons, 19.0.0.0.0...Patching component oracle.ldap.rsf.ic, 19.0.0.0.0...Patching component oracle.dbdev, 19.0.0.0.0...Patching component oracle.ctx.rsf, 19.0.0.0.0...Patching component oracle.bali.ice, 11.1.1.7.0...Patching component oracle.xdk, 19.0.0.0.0...Patching component oracle.xdk.parser.java, 19.0.0.0.0...Patching component oracle.rdbms.rsf.ic, 19.0.0.0.0...Patching component oracle.precomp.lang, 19.0.0.0.0...Patching component oracle.precomp.common, 19.0.0.0.0...Patching component oracle.jdk, 1.8.0.201.0...Patch 30557433 successfully applied.Sub-set patch [29517242] has become inactive due to the application of a super-set patch [30557433].Please refer to Doc ID 2161861.1 for any possible further required actions.Log file location: /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatch/opatch3020-03-03_14-46-35PM_1.logOPatch succeeded.

补丁应用完成后,使用datapatch工具在数据库中应用SQL文件

[oracle@sdedu 30463595]$ sqlplus / as sysdbaSQL*Plus: Release 19.0.0.0.0 - Production on Tue Mar 3 11:50:51 2020Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle. All rights reserved.Connected to:Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - ProductionVersion 19.3.0.0.0SQL> shu immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL>SQL> startup upgradeORACLE instance started.Total System Global Area 1543500832 bytesFixed Size 9135136 bytesVariable Size 973078528 bytesDatabase Buffers 553648128 bytesRedo Buffers 7639040 bytesDatabase mounted.Database opened.SQL> show pdbs;CON_ID CON_NAME OPEN MODE RESTRICTED---------- ------------------------------ ---------- ----------2 PDB$SEED MIGRATE YES3 PDB1 MOUNTEDSQL> alter pluggable database all open upgrade;Pluggable database altered.SQL> quitDisconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - ProductionVersion 19.3.0.0.0[oracle@sdedu 30463595]$ cd $ORACLE_HOME/OPatch[oracle@sdedu OPatch]$ ./datapatch -verboseSQL Patching tool version 19.3.0.0.0 Production on Tue Mar 3 11:54:09 2020Copyright (c) 2012, 2019, Oracle. All rights reserved.Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_29704_2020_03_03_11_54_09/sqlpatch_invocation.logConnecting to database...OKGathering database info...doneNote: Datapatch will only apply or rollback SQL fixes for PDBsthat are in an open state, no patches will be applied to closed PDBs.Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation(Doc ID 1585822.1)Bootstrapping registry and package to current versions...doneDetermining current state...doneCurrent state of interim SQL patches:Interim patch 30484981 (OJVM RELEASE UPDATE: 19.6.0.0.200114 (30484981)):Binary registry: InstalledPDB CDB$ROOT: Applied successfully on 03-MAR-20 11.22.13.371425 AMPDB PDB$SEED: Applied successfully on 03-MAR-20 11.22.13.498532 AMPDB PDB1: Not installedCurrent state of release update SQL patches:Binary registry:19.3.0.0.0 Release_Update 190410122720: InstalledPDB CDB$ROOT:Applied 19.3.0.0.0 Release_Update 190410122720 successfully on 13-MAY-19 11.43.02.621425 PMPDB PDB$SEED:Applied 19.3.0.0.0 Release_Update 190410122720 successfully on 13-MAY-19 11.43.08.787211 PMPDB PDB1:Applied 19.3.0.0.0 Release_Update 190410122720 successfully on 13-MAY-19 11.43.08.787211 PMAdding patches to installation queue and performing prereq checks...doneInstallation queue:For the following PDBs: CDB$ROOT PDB$SEEDNo interim patches need to be rolled backNo release update patches need to be installedNo interim patches need to be appliedFor the following PDBs: PDB1No interim patches need to be rolled backNo release update patches need to be installedThe following interim patches will be applied:30484981 (OJVM RELEASE UPDATE: 19.6.0.0.200114 (30484981))Installing patches...Patch installation complete. Total patches installed: 1Validating logfiles...donePatch 30484981 apply (pdb PDB1): SUCCESSlogfile: /u01/app/oracle/cfgtoollogs/sqlpatch/30484981/23248235/30484981_apply_SS19C_PDB1_2020Mar03_11_54_44.log (no errors)SQL Patching tool complete on Tue Mar 3 11:55:06 2020

继续使用utlrp脚本来编译失败的对象;

[oracle@sdedu OPatch]$ sqlplus / as sysdbaSQL*Plus: Release 19.0.0.0.0 - Production on Tue Mar 3 11:55:24 2020Version 19.3.0.0.0Copyright (c) 1982, 2019, Oracle. All rights reserved.Connected to:Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - ProductionVersion 19.3.0.0.0SQL> shu immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL> startupORACLE instance started.Total System Global Area 1543500832 bytesFixed Size 9135136 bytesVariable Size 973078528 bytesDatabase Buffers 553648128 bytesRedo Buffers 7639040 bytesDatabase mounted.Database opened.SQL> alter pluggable database all open;Pluggable database altered.SQL> @?/rdbms/admin/utlrpSession altered.TIMESTAMP--------------------------------------------------------------------------------COMP_TIMESTAMP UTLRP_BGN 2020-03-03 11:57:15DOC> The following PL/SQL block invokes UTL_RECOMP to recompile invalidDOC> objects in the database. Recompilation time is proportional to theDOC> number of invalid objects in the database, so this command may takeDOC> a long time to execute on a database with a large number of invalidDOC> objects.DOC>DOC> Use the following queries to track recompilation progress:DOC>DOC> 1. Query returning the number of invalid objects remaining. ThisDOC> number should decrease with time.DOC> SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);DOC>DOC> 2. Query returning the number of objects compiled so far. This numberDOC> should increase with time.DOC> SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;DOC>DOC> This script automatically chooses serial or parallel recompilationDOC> based on the number of CPUs available (parameter cpu_count) multipliedDOC> by the number of threads per CPU (parameter parallel_threads_per_cpu).DOC> On RAC, this number is added across all RAC nodes.DOC>DOC> UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallelDOC> recompilation. Jobs are created without instance affinity so that theyDOC> can migrate across RAC nodes. Use the following queries to verifyDOC> whether UTL_RECOMP jobs are being created and run correctly:DOC>DOC> 1. Query showing jobs created by UTL_RECOMPDOC> SELECT job_name FROM dba_scheduler_jobsDOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%';DOC>DOC> 2. Query showing UTL_RECOMP jobs that are runningDOC> SELECT job_name FROM dba_scheduler_running_jobsDOC> WHERE job_name like 'UTL_RECOMP_SLAVE_%';DOC>#PL/SQL procedure successfully completed.TIMESTAMP--------------------------------------------------------------------------------COMP_TIMESTAMP UTLRP_END 2020-03-03 11:57:17DOC> The following query reports the number of invalid objects.DOC>DOC> If the number is higher than expected, please examine the errorDOC> messages reported with each object (using SHOW ERRORS) to see if theyDOC> point to system misconfiguration or resource constraints that must beDOC> fixed before attempting to recompile these objects.DOC>#OBJECTS WITH ERRORS-------------------0DOC> The following query reports the number of exceptions caught duringDOC> recompilation. If this number is non-zero, please query the errorDOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errorsDOC> are due to misconfiguration or resource constraints that must beDOC> fixed before objects can compile successfully.DOC> Note: Typical compilation errors (due to coding errors) are notDOC> logged into this table: they go into DBA_ERRORS instead.DOC>#ERRORS DURING RECOMPILATION---------------------------0Function created.PL/SQL procedure successfully completed.Function dropped.PL/SQL procedure successfully completed.SQL>

我们通过dba_registry_sqlpatch视图来验证补丁的应用状态是否为"SUCCESS";

SQL> select PATCH_ID,PATCH_TYPE,ACTION,STATUS,TARGET_VERSION from dba_registry_sqlpatch;PATCH_ID PATCH_TYPE ACTION STATUS TARGET_VERSION---------- ---------- --------------- ---------------------- --------------29517242 RU APPLY SUCCESS 19.3.0.0.030484981 INTERIM APPLY SUCCESS 19.3.0.0.030557433 RU APPLY SUCCESS 19.6.0.0.0

最后使用opatch lsinv来查看补丁最终状态。

[oracle@sdedu 30557433]$ /u01/app/oracle/product/19.3.0/dbhome_1/OPatch/opatch lsinvOracle Interim Patch Installer version 12.2.0.1.17Copyright (c) 2020, Oracle Corporation. All rights reserved.Oracle Home : /u01/app/oracle/product/19.3.0/dbhome_1Central Inventory : /u01/app/oraInventoryfrom : /u01/app/oracle/product/19.3.0/dbhome_1/oraInst.locOPatch version : 12.2.0.1.17OUI version : 12.2.0.7.0Log file location : /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatch/opatch3020-03-03_16-57-39PM_1.logLsinventory Output file location : /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2020-03-03_16-57-39PM.txt--------------------------------------------------------------------------------Local Machine Information::Hostname: sdedu.sandata.com.cnARU platform id: 226ARU platform description:: Linux x86-64Installed Top-level Products (1):Oracle Database 19c 19.0.0.0.0There are 1 products installed in this Oracle Home.Interim patches (3) :Patch 30557433 : applied on Tue Mar 03 14:48:18 CST 2020Unique Patch ID: 23305305Patch description: "Database Release Update : 19.6.0.0.200114 (30557433)"Created on 6 Jan 2020, 19:07:34 hrs PST8PDTBugs fixed:30545281, 8476681, 14735102, 17428816, 19080742, 19697993, 2031335621374587, 21965541, 23296836, 23606241, 24687075, 25756945, 2580620125883179, 25986062, 25997810, 26476244, 26611353, 26739322, 2677781426872233, 27036163, 27044169, 27101798, 27126938, 27195935, 2724499927254335, 27359766, 27369515, 27406105, 27411022, 27423500, 2743971627453490, 27458357, 27489107, 27666312, 27710072, 27729678, 2784629827880025, 27934711, 27935464, 27941110, 27957203, 27967484, 2806497728072567, 28109326, 28125947, 28129791, 28181021, 28189466, 2820426228205555, 28209985, 28210681, 28271258, 28271693, 28279456, 2829456328313275, 28319114, 28326928, 28350595, 28371123, 28373960, 2837538328379065, 28381939, 28386259, 28390273, 28395302, 28397317, 2840282328410431, 28431445, 28435333, 28454215, 28463226, 28475242, 2848429928489419, 28492006, 28498976, 28502773, 28513333, 28521330, 2853017128534475, 28538439, 28542455, 28546290, 28547068, 28547926, 2855864528561704, 28567417, 28567819, 28569897, 28572407, 28572533, 2857254428572667, 28572834, 28578945, 28587723, 28589509, 28593682, 2859408628597221, 28601957, 28605066, 28606598, 28612239, 28620697, 2862586228627033, 28636532, 28639299, 28643718, 28644549, 28645570, 2864620028646939, 28649388, 28655209, 28663782, 28672457, 28673945, 2869210328692275, 28694872, 28696373, 28705231, 28710385, 28710734, 2871446128715727, 28718469, 28719348, 28720204, 28720418, 28721497, 2872222928730079, 28734355, 28740708, 28742555, 28749853, 28752923, 2875501128758722, 28760206, 28765983, 28767240, 28769456, 28772390, 2877441628776811, 28777214, 28781754, 28785531, 28789531, 28791852, 2879555128795734, 28802734, 28804517, 28810381, 28811560, 28815123, 2881535528817449, 28819640, 28820669, 28821847, 28824482, 28827682, 2883197128833912, 28835937, 28836716, 28844738, 28849776, 28854004, 2885552028855922, 28857552, 28862532, 28863432, 28863487, 28867992, 2887357528875089, 28876253, 28876639, 28878865, 28882784, 28884931, 2888730528888327, 28889730, 28892794, 28897512, 28899663, 28901126, 2890545728905615, 28907196, 28912691, 28915561, 28917080, 28918429, 2891914528922227, 28922532, 28922608, 28925634, 28925880, 28927452, 2893291428933158, 28935293, 28936114, 28937717, 28938698, 28940179, 2894028128941901, 28942455, 28945421, 28945994, 28949888, 28950868, 2895153328952168, 28954762, 28955606, 28955883, 28956908, 28957292, 2895772328958088, 28959493, 28960863, 28962775, 28965084, 28965095, 2896523128965376, 28966444, 28974083, 28977322, 28983095, 28983486, 2898547828986207, 28986231, 28986257, 28986326, 28986481, 28988482, 2898930628993295, 28993353, 28994307, 28996376, 29000000, 29001305, 2900188829002488, 29002784, 29002927, 29003407, 29003738, 29006318, 2900662129007321, 29007353, 29007775, 29008035, 29008669, 29009513, 2901012629011936, 29012609, 29013475, 29013832, 29014076, 29015118, 2901726529018655, 29019121, 29021063, 29021352, 29022986, 29024054, 2902455229024732, 29026582, 29026606, 29027456, 29027694, 29027940, 2903157529031600, 29032234, 29032276, 29032457, 29032607, 29033052, 2903314529033200, 29033280, 29034587, 29037290, 29038528, 29038728, 2903908929039510, 29040739, 29043554, 29043651, 29043725, 29044763, 2904495429046482, 29047850, 29048178, 29048289, 29048498, 29048605, 2905035729050560, 29050765, 29050886, 29051702, 29051953, 29052726, 2905378329056024, 29056270, 29056560, 29056767, 29056894, 29059011, 2906021629061016, 29061959, 29062692, 29062848, 29062860, 29062868, 2911052629110783, 29110790, 29110797, 29110802, 29110805, 29111598, 2911328229113305, 29115857, 29117526, 29117642, 29118543, 29119077, 2912022329122224, 29122254, 29123297, 29123432, 29123482, 29124368, 2912503629125374, 29125380, 29126345, 29127957, 29128693, 29128935, 2912945029129497, 29129712, 29130219, 29131539, 29132869, 29132938, 2913347029134447, 29135383, 29135649, 29136111, 29138641, 29139956, 2914131629141341, 29141685, 29142609, 29142667, 29143516, 29144995, 2914521429145730, 29149829, 29150338, 29151520, 29152357, 29155099, 2915705129157389, 29158680, 29158899, 29159909, 29159936, 29160174, 2916209529163156, 29163415, 29163437, 29163524, 29163567, 29167111, 2916734229167374, 29167940, 29168137, 29168219, 29168433, 29169073, 2916921529170232, 29171683, 29171942, 29172618, 29172826, 29173140, 2917337329173817, 29174004, 29176318, 29177466, 29177543, 29177886, 2917838529180313, 29180455, 29180559, 29180893, 29181153, 29181231, 2918162029181743, 29181923, 29182019, 29182517, 29182901, 29183912, 2918429729184666, 29185193, 29186456, 29189302, 29189307, 29189889, 2919023529190474, 29190663, 29190740, 29191541, 29192419, 29192468, 2919268529193207, 29194205, 29194367, 29194493, 29194827, 29194981, 2919527929195337, 29195758, 29196725, 29198092, 29198913, 29199635, 2919973329200316, 29200700, 29201494, 29201539, 29201787, 29202104, 2920246129202850, 29203122, 29203166, 29203425, 29203443, 29203604, 2920528129205323, 29205419, 29205463, 29205767, 29205918, 29206109, 2920660529207073, 29208260, 29208732, 29211457, 29211724, 29212012, 2921243329212611, 29213320, 29213351, 29213613, 29213775, 29213850, 2921387929214561, 29214960, 29216312, 29216723, 29216746, 29216984, 2921729429217472, 29217828, 29217848, 29218570, 29219205, 29219273, 2922007929221248, 29221891, 29221942, 29222031, 29222784, 29223833, 2922385929223967, 29224065, 29224605, 29225076, 29225168, 29225758, 2922760229228869, 29229164, 29229754, 29229844, 29229955, 29230252, 2923056529231133, 29232117, 29232154, 29232449, 29233415, 29233810, 2923395329234123, 29236573, 29237538, 29237575, 29237744, 29240307, 2924075929241345, 29241651, 29242017, 29242884, 29243958, 29245137, 2924516029246163, 29247415, 29247712, 29247906, 29248495, 29248552, 2924883529248858, 29249412, 29249991, 29250059, 29250317, 29251259, 2925318429253871, 29254031, 29254930, 29255178, 29255273, 29255431, 2925543529256426, 29259119, 29259320, 29260452, 29260956, 29261547, 2926154829261906, 29262512, 29262887, 29265448, 29266248, 29266899, 2926729229268412, 29269171, 29269228, 29269825, 29270585, 29273539, 2927357029273735, 29273812, 29273847, 29274428, 29274564, 29274627, 2927546129276272, 29277317, 29278218, 29278684, 29279658, 29279751, 2927985429281527, 29281691, 29281796, 29282233, 29282898, 29285197, 2928550329285788, 29285956, 29286037, 29286229, 29287130, 29287705, 2929283729293072, 29293574, 29297863, 29297915, 29298220, 29299049, 2929908229299844, 29301463, 29301566, 29302963, 29303918, 29304781, 2930622629306713, 29307638, 29311528, 29311588, 29312310, 29312672, 2931273429312753, 29312889, 29313347, 29313417, 29313525, 29314539, 2931463629317756, 29318410, 29319441, 29321489, 29323946, 29324568, 2932473529325087, 29325105, 29325257, 29325765, 29325993, 29327044, 2932904229329087, 29329807, 29330361, 29331066, 29331209, 29331380, 2933149329332292, 29332395, 29332763, 29332771, 29333500, 29336843, 2933731029337742, 29338315, 29338348, 29338453, 29338780, 29338913, 2933910129339155, 29341209, 29343086, 29343861, 29345937, 29346057, 2934621129346943, 29347620, 29348176, 29350052, 29350762, 29351386, 2935166229351716, 29351735, 29351749, 29352298, 29352724, 29352867, 2935294729353271, 29353432, 29353821, 29353960, 29355654, 29356547, 2935670429356711, 29356752, 29358509, 29358828, 29360252, 29360285, 2936067229360911, 29360950, 29361319, 29361472, 29361801, 29363151, 2936417129364177, 29366940, 29367019, 29367561, 29368253, 29368310, 2937254129373418, 29373588, 29374179, 29375355, 29375941, 29375984, 2937634629377804, 29377986, 29378029, 29378834, 29378913, 29379978, 2938264129382784, 29382815, 29383695, 29384781, 29384854, 29384864, 2938542929385652, 29386502, 29386635, 29386660, 29387073, 29387274, 2938802029388072, 29388094, 29388524, 29388830, 29389889, 29390011, 2939043529390785, 29391030, 29391237, 29391849, 29391925, 29392966, 2939329129394014, 29394140, 29394749, 29395657, 29397954, 29397996, 2939848829398863, 29399046, 29399100, 29399121, 29399336, 29399938, 2940213129404483, 29405012, 29405462, 29405651, 29405996, 29407804, 2940885329409149, 29409455, 29410311, 29410834, 29411037, 29411469, 2941206629412269, 29416688, 29417173, 29417719, 29417884, 29418165, 2942083429421059, 29423003, 29423016, 29423156, 29423826, 29424999, 2942624129429017, 29429264, 29429466, 29429566, 29430524, 29430866, 2943119229431485, 29432176, 29434301, 29435474, 29435652, 29436454, 2943651429436727, 29437594, 29437712, 29438277, 29438736, 29439522, 2944119629443187, 29443250, 29444072, 29444282, 29444602, 29446669, 2944849829449477, 29449845, 29449852, 29450193, 29450421, 29450812, 2945093629451386, 29452251, 29452576, 29452936, 29452953, 29454978, 2945542429456714, 29457312, 29457370, 29457502, 29457807, 29457978, 2946025229461420, 29461791, 29462594, 29462767, 29462957, 29463047, 2946352829464616, 29464779, 29465177, 29467622, 29469565, 29470291, 2947186029472618, 29476473, 29481584, 29483452, 29483532, 29483626, 2948367229483685, 29483712, 29483723, 29483771, 29485099, 29486181, 2948889429489436, 29489546, 29490256, 29492127, 29492939, 29493122, 2949424529495057, 29495684, 29497311, 29497588, 29497696, 29498198, 2950025729500826, 29502561, 29503543, 29503631, 29503827, 29504492, 2950468229505668, 29507270, 29507616, 29508681, 29509777, 29510278, 2951161129514479, 29515134, 29515240, 29515476, 29515766, 29515834, 2951630029516727, 29516766, 29517168, 29517883, 29521187, 29521688, 2952174829521862, 29522358, 29522561, 29522662, 29523055, 29523511, 2952459929525467, 29525886, 29526966, 29527595, 29527610, 29528368, 2952914729530440, 29530515, 29530812, 29530909, 29531654, 29531836, 2953253229536342, 29536445, 29538631, 29541742, 29541769, 29542084, 2954244929542643, 29543034, 29543956, 29546817, 29547010, 29547867, 2954842729548687, 29548722, 29549071, 29549104, 29549154, 29549730, 2955277329553141, 29557144, 29557261, 29557336, 29557556, 29558238, 2955897529559187, 29559446, 29559908, 29559981, 29564592, 29564593, 2956561129580394, 29580983, 29581771, 29584261, 29584693, 29586143, 2958776529597536, 29597754, 29598039, 29598046, 29598233, 29599008, 2959930029601461, 29602831, 29603460, 29603884, 29604002, 29604257, 2960713629607797, 29608000, 29610506, 29611020, 29611991, 29615824, 2961624429616414, 29618074, 29618190, 29620042, 29622936, 29625065, 2962580429625876, 29626154, 29626732, 29628200, 29629430, 29629650, 2962968129629745, 29631749, 29632095, 29632265, 29632611, 29633697, 2963375329633936, 29634643, 29635427, 29635717, 29635990, 29637362, 2963752629638285, 29641736, 29643721, 29645349, 29648928, 29651183, 2965152029653132, 29653246, 29655668, 29656819, 29657422, 29657960, 2966102829661065, 29661722, 29663368, 29664087, 29664161, 29665940, 2966799429668005, 29669413, 29670782, 29671363, 29672507, 29676089, 2967705129677173, 29677733, 29677927, 29679856, 29681987, 29683039, 2968721429687459, 29687718, 29687763, 29689145, 29689255, 29692694, 2969486929695425, 29695841, 29696310, 29700125, 29700460, 29700770, 2970393229707099, 29707896, 29708915, 29710188, 29710858, 29713810, 2971522029716194, 29716491, 29717659, 29719146, 29720133, 29721418, 2972547629725781, 29726695, 29739576, 29741976, 29742223, 29746962, 2974749329747648, 29747653, 29748285, 29748336, 29748513, 29749471, 2975067329751094, 29753244, 29754951, 29755821, 29756274, 29756444, 2975709929757264, 29757651, 29758217, 29758661, 29761678, 29761837, 2976191129765393, 29766207, 29766503, 29766679, 29768899, 29770750, 2977103229771242, 29773197, 29773842, 29775393, 29779196, 29782211, 2978282329782866, 29784106, 29785239, 29787292, 29787766, 29791152, 2979188029793318, 29794462, 29795712, 29795957, 29796378, 29797726, 2980269529804875, 29805772, 29809837, 29812489, 29813503, 29815713, 2981727829821582, 29825525, 29827852, 29831196, 29834506, 29836096, 2983848529838773, 29839715, 29840619, 29841267, 29841687, 29843277, 2984369229844226, 29845530, 29846126, 29846645, 29848084, 29848849, 2984910029850930, 29851733, 29853485, 29858121, 29858376, 29865188, 2986565829869086, 29869404, 29869887, 29870065, 29871098, 29873665, 2987545929875565, 29877608, 29878076, 29881478, 29881839, 29882729, 2988495829887111, 29888621, 29890740, 29891916, 29893132, 29897418, 2989786329900203, 29902327, 29902330, 29903299, 29903454, 29906678, 2990794229909658, 29912286, 29914449, 29915217, 29915848, 29916975, 2992002529921318, 29926466, 29927756, 29928210, 29937565, 29938225, 2994037329942096, 29942554, 29943670, 29944035, 29944660, 29945645, 2994638829951620, 29956016, 29957493, 29961609, 29962248, 29962927, 2996293929966768, 29967223, 29968085, 29970298, 29971027, 29971888, 2998978329989845, 29991257, 29997326, 30003187, 30006159, 30006985, 3000779730008125, 30008214, 30009710, 30015070, 30019864, 30024618, 3002980630032376, 30033547, 30034456, 30035598, 30038392, 30040157, 3004249030043610, 30044507, 30047702, 30047765, 30051176, 30051783, 3005303630058149, 30058453, 30059106, 30059109, 30066352, 30074349, 3007447230075037, 30076197, 30078675, 30079949, 30080266, 30081580, 3008348830084971, 30085897, 30086992, 30090568, 30092859, 30095591, 3009595230097092, 30098251, 30099454, 30101186, 30104555, 30106748, 3011022430110370, 30110518, 30114489, 30114534, 30127522, 30127904, 3013164530135396, 30142907, 30149658, 30150606, 30154633, 30155837, 3015932930164714, 30165493, 30165503, 30170104, 30174401, 30175291, 3017759730178250, 30187866, 30189516, 30191274, 30193165, 30206493, 3021804430223712, 30223847, 30224950, 30235919, 30246179, 30247305, 3025209830252156, 30253608, 30255143, 30264405, 30266791, 30269428, 3027418830282591, 30299817, 30312094, 30318638, 30324180, 30342878, 3036574530389229, 30402386, 30408515, 30412188, 30453442, 30458593, 3047416730474774, 30485255, 30534827, 30641755Patch 30484981 : applied on Tue Mar 03 13:56:38 CST 2020Unique Patch ID: 23248235Patch description: "OJVM RELEASE UPDATE: 19.6.0.0.200114 (30484981)"Created on 5 Dec 2019, 05:10:10 hrs PST8PDTBugs fixed:29540327, 29254623, 29445548, 29774362, 30134746, 30160625, 2994227530534662, 29512125Patch 29585399 : applied on Thu Apr 18 15:21:33 CST 2019Unique Patch ID: 22840393Patch description: "OCW RELEASE UPDATE 19.3.0.0.0 (29585399)"Created on 9 Apr 2019, 19:12:47 hrs PST8PDTBugs fixed:27222128, 27572040, 27604329, 27760043, 27877830, 28302580, 2847067328621543, 28642469, 28699321, 28710663, 28755846, 28772816, 2878532128800508, 28808652, 28815557, 28847541, 28847572, 28870496, 2887104028874416, 28877252, 28881191, 28881848, 28888083, 28911140, 2892525028925460, 28935956, 28940472, 3, 28942694, 28951332, 28963036, 2896877928980448, 28995287, 29003207, 29003617, 29016294, 29018680, 2902487629026154, 29027933, 29047127, 29052850, 29058476, 29111631, 2911245529117337, 29123444, 29125708, 29125786, 29129476, 29131772, 2913245629139727, 29146157, 29147849, 29149170, 29152603, 29152752, 2915463129154636, 29154829, 29159216, 29159661, 29160462, 29161923, 2916954029169739, 29170717, 29173618, 29181568, 29182920, 29183298, 2918609129191827, 29201143, 29201695, 29209545, 29210577, 29210610, 2921062429210683, 29213641, 29219627, 29224294, 29225861, 29229839, 2923593429242906, 29243749, 29244495, 29244766, 29244968, 29248723, 2924958329251564, 29255616, 29260224, 29261695, 29271019, 29273360, 2928209029282666, 29285453, 29285621, 29290235, 29292232, 29293806, 2929475329299830, 29307090, 29307109, 29311336, 29329675, 29330791, 2933929929357821, 29360467, 29360775, 29367971, 29368725, 29379299, 2937938129380527, 29381000, 29382296, 29391301, 29393649, 29402110, 2941193129413360, 29457319, 29465047---------------------------------------------------------------------------OPatch succeeded.

3. 总结

通过OPatch工具,我们可以很方便的将Oracle Database 19.3 升级到Oracle Database 19.6。对于公开下载的19.3版本来说,尽快安装patch来解决Bug和安全问题,是非常必要的措施。

4. 注意
如果没有关闭实例就进行补丁的安装,就会报如下错误:

[oracle@sdedu 30557433]$ /u01/app/oracle/product/19.3.0/dbhome_1/OPatch/opatch applyOracle Interim Patch Installer version 12.2.0.1.17Copyright (c) 2020, Oracle Corporation. All rights reserved.Oracle Home : /u01/app/oracle/product/19.3.0/dbhome_1Central Inventory : /u01/app/oraInventoryfrom : /u01/app/oracle/product/19.3.0/dbhome_1/oraInst.locOPatch version : 12.2.0.1.17OUI version : 12.2.0.7.0Log file location : /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatch/opatch3020-03-03_12-00-34PM_1.logVerifying environment and performing prerequisite checks...Prerequisite check "CheckActiveFilesAndExecutables" failed.The details are:Following active executables are not used by opatch process :/u01/app/oracle/product/19.3.0/dbhome_1/bin/oracleFollowing active executables are used by opatch process :/u01/app/oracle/product/19.3.0/dbhome_1/lib/libclntsh.so.19.1/u01/app/oracle/product/19.3.0/dbhome_1/lib/libsqlplus.soUtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.Log file location: /u01/app/oracle/product/19.3.0/dbhome_1/cfgtoollogs/opatch/opatch3020-03-03_12-00-34PM_1.logOPatch failed with error code 73
0