游客发表

数据库作为企业的机环境安核心应用节点之一,其稳定性至关重要,装补战但是单丁实一些产品bug对oracle数据库的使用产生很大的影响,有些bug,机环境安我们通过调整参数来规避,装补战但是单丁实一些bug需要打补丁才能解决。 作为DBA,机环境安掌握给数据库打补丁是装补战一项必备的技能,本文分享一下在 Oracle 11g 数据库上应用 PSU 补丁的单丁实步骤。

opatch 实用程序用于将补丁应用到数据库。单丁实所以在应用补丁之前,机环境安我们需要检查补丁是亿华云装补战否支持现有的opatch版本。因此,请参阅补丁的自述文件以了解最低支持版本。
根据补丁自述文件:
1.2.1 OPatch 实用程序 您必须使用 OPatch 实用程序版本 11.2.0.3.6 或更高版本才能应用此补丁。Oracle 建议您使用适用于 11.2 的最新发布的 OPatch 版本,该版本可通过选择 11.2.0.0.0 版本从 My Oracle Support 补丁 6880880 下载。 有关 OPatch 文档的信息,包括任何已知问题,请参阅 My Oracle Support Document 293369.1 OPatch 文档列表。
所以对于这个补丁,opatch版本应该是11.2.0.3.6或者更高版本
让我们检查数据库中现有的 opatch 版本。
复制echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0/db_1
$ORACLE_HOME/OPatch/opatch version
OPatch Version: 11.2.0.3.4
OPatch succeeded.1.2.3.4.5.6.现有版本为 11.2.0.3.4,低于要求的版本。所以我们需要安装所需的b2b供应网 opatch 实用程序。
(3)安装 OPATCH 实用程序从 Oracle 支持链接下载 opatch 实用程序 – 6880880.
复制cd $ORACLE_HOME
mv OPatch OPatch.bak1.2. 解压缩 zip 文件。复制unzip p6880880_112000_Linux-x86-64.zip1. 检查opatch版本复制$ $ORACLE_HOME/OPatch/opatch version
OPatch Version: 11.2.0.3.19
OPatch succeeded.1.2.3.4.现在让我们继续 PSU 补丁安装。
复制unzip p27734982_112040_Linux-x86-64.zip
ls -ltr
total 243220
drwxr-xr-x 21 oracle oinstall 4096 May 31 12:49 27734982
-rw-rw-r-- 1 oracle oinstall 93035 Jul 17 13:15 PatchSearch.xml
-rw-r--r-- 1 oracle oinstall 140724601 Oct 8 09:17 p27734982_112040_Linux-x86-64.zip1.2.3.4.5.6. (2)再次检查 ORACLE_HOME 是否有冲突 复制-go to patch folder.
cd 27734982[27734982]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./Oracle Interim Patch Installer version 11.2.0.3.19Copyright (c) 2018,Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_1/oraInst.locOPatch version : 11.2.0.3.19OUI version : 11.2.0.4.0Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2018-10-08_09-35-06AM_1.logInvoking prereq "checkconflictagainstohwithdetail"Prereq "checkConflictAgainstOHWithDetail"passed.
OPatch succeeded.1.2.3.4.5.6.7.8.9.10.11.12.13.14.15. (3)关闭数据库和侦听器复制shutdown immediate;
lsnrctl stop LISTENER_DMCRM1.2.3.注意– 如果任何 Goldengate 进程正在 ORACLE_HOME 上运行,那么这些进程都需要关闭。
(4)检查活动的可执行文件$ORACLE_HOME/OPatch/opatch prereq CheckActiveFilesAndExecutables -ph ./。
复制[27734982]$ $ORACLE_HOME/OPatch/opatch prereq CheckActiveFilesAndExecutables -ph ./Oracle Interim Patch Installer version 11.2.0.3.19Copyright (c) 2018,Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_1/oraInst.locOPatch version : 11.2.0.3.19OUI version : 11.2.0.4.0Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2018-10-08_09-35-58AM_1.logInvoking prereq "checkactivefilesandexecutables"Prereq "checkActiveFilesAndExecutables" for patch 17478514passed.
Prereq "checkActiveFilesAndExecutables" for patch 18031668passed.
Prereq "checkActiveFilesAndExecutables" for patch 18522509passed.
Prereq "checkActiveFilesAndExecutables" for patch 19121551passed.
Prereq "checkActiveFilesAndExecutables" for patch 19769489passed.
Prereq "checkActiveFilesAndExecutables" for patch 20299013passed.
Prereq "checkActiveFilesAndExecutables" for patch 20760982passed.
Prereq "checkActiveFilesAndExecutables" for patch 21352635passed.
Prereq "checkActiveFilesAndExecutables" for patch 21948347passed.
Prereq "checkActiveFilesAndExecutables" for patch 22502456passed.
Prereq "checkActiveFilesAndExecutables" for patch 23054359passed.
Prereq "checkActiveFilesAndExecutables" for patch 24006111passed.
Prereq "checkActiveFilesAndExecutables" for patch 24732075passed.
Prereq "checkActiveFilesAndExecutables" for patch 25869727passed.
Prereq "checkActiveFilesAndExecutables" for patch 26609445passed.
Prereq "checkActiveFilesAndExecutables" for patch 26392168passed.
Prereq "checkActiveFilesAndExecutables" for patch 26925576passed.
Prereq "checkActiveFilesAndExecutables" for patch 27338049passed.
Prereq "checkActiveFilesAndExecutables" for patch 27734982passed.
OPatch succeeded.1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30.31. (5)应用补丁cd 27734982 $ORACLE_HOME/OPatch/ opatch apply。
复制
[27734982]$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.19Copyright (c) 2018,Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_1/oraInst.locOPatch version : 11.2.0.3.19OUI version : 11.2.0.4.0Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2018-10-08_09-36-41AM_1.logVerifying environment andperforming prerequisite checks...
OPatch continues with these patches: 17478514 18031668 18522509 19121551 19769489 20299013 20760982 21352635 21948347 22502456 23054359 24006111 24732075 25869727 26609445 26392168 26925576 27338049 27734982Do you want to proceed? [y|n] ----------------------->> Press Yy
User Responded with:Y
All checks passed.
Provide your email address to be informed of security issues, install andinitiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.htmlfor details.
Email address/User Name:You have notprovided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: Y ---- > Press YPlease shutdown Oracle instances running out of this ORACLE_HOME onthe local system.
(Oracle Home = /u01/app/oracle/product/11.2.0/db_1)Is the local system ready for patching? [y|n] -- >> Press Yy
User Responded with:Y
Backing up files...
Applying sub-patch 17478514 to OH /u01/app/oracle/product/11.2.0/db_1Patching component oracle.rdbms, 11.2.0.4.0...
Patching component oracle.rdbms.rsf, 11.2.0.4.0...
Patching component oracle.sdo, 11.2.0.4.0...
Patching component oracle.ctx.rsf, 11.2.0.4.0...
Patching component oracle.rdbms, 11.2.0.4.0...
Patching component oracle.rdbms.rman, 11.2.0.4.0...
OPatch found the word "error" inthe stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:chmod: changing permissions of `/u01/app/oracle/product/11.2.0/db_1/bin/extjobO: Operation not permittedmake: [iextjob] Error 1 (ignored)Composite patch 27734982 successfully applied.OPatch Session completed with warnings.Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2018-10-08_09-36-41AM_1.logOPatch completed with warnings.1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30.31.32.33.34.35.36.37.38.39.40.41.42.43.44.45.46.47.48.修补完成。可以忽略警告。
(6)验证补丁是否已经更新$ORACLE_HOME/OPatch/opatch lsinventory。
复制[27734982]$ $ORACLE_HOME/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.19Copyright (c) 2018,Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_1/oraInst.locOPatch version : 11.2.0.3.19OUI version : 11.2.0.4.0Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2018-10-08_09-41-09AM_1.logLsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2018-10-08_09-41-09AM.txt--------------------------------------------------------------------------------Local Machine Information::Hostname:ARU platform id: 226ARU platform description:: Linux x86-64Installed Top-level Products (1):Oracle Database 11g 11.2.0.4.0There are 1 products installed inthis Oracle Home.
Interim patches (1) :Patch 27734982 : applied on Mon Oct 08 09:39:20 AST 2018Unique Patch ID: 22229176Patch description: "Database Patch Set Update : 11.2.0.4.180717 (27734982)"Created on 31 May 2018, 01:37:49hrs PST8PDT
Sub-patch 27338049; "Database Patch Set Update : 11.2.0.4.180417 (27338049)"Sub-patch 26925576; "Database Patch Set Update : 11.2.0.4.180116 (26925576)"Sub-patch 26392168; "Database Patch Set Update : 11.2.0.4.171017 (26392168)"Sub-patch 26609445; "Database Patch Set Update : 11.2.0.4.170814 (26609445)"Sub-patch 25869727; "Database Patch Set Update : 11.2.0.4.170718 (25869727)"Sub-patch 24732075; "Database Patch Set Update : 11.2.0.4.170418 (24732075)"Sub-patch 24006111; "Database Patch Set Update : 11.2.0.4.161018 (24006111)"Sub-patch 23054359; "Database Patch Set Update : 11.2.0.4.160719 (23054359)"Sub-patch 22502456; "Database Patch Set Update : 11.2.0.4.160419 (22502456)"Sub-patch 21948347; "Database Patch Set Update : 11.2.0.4.160119 (21948347)"Sub-patch 21352635; "Database Patch Set Update : 11.2.0.4.8 (21352635)"Sub-patch 20760982; "Database Patch Set Update : 11.2.0.4.7 (20760982)"Sub-patch 20299013; "Database Patch Set Update : 11.2.0.4.6 (20299013)"Sub-patch 19769489; "Database Patch Set Update : 11.2.0.4.5 (19769489)"Sub-patch 19121551; "Database Patch Set Update : 11.2.0.4.4 (19121551)"Sub-patch 18522509; "Database Patch Set Update : 11.2.0.4.3 (18522509)"Sub-patch 18031668; "Database Patch Set Update : 11.2.0.4.2 (18031668)"Sub-patch 17478514; "Database Patch Set Update : 11.2.0.4.1 (17478514)"Bugs fixed:21174504, 17184721, 21538558, 16091637, 18092127, 17381384, 1597996520671094, 16731148, 16314254, 13837378, 18441944, 17835048, 1355855717008068, 17201159, 25427662, 17853498, 20717359, 17246576, 1835616618681862, 18440047, 20569094, 20031873, 16875449, 20387265, 1978884217296856, 21330264, 14010183, 17648596, 17551063, 17025461, 2471973617267114, 22507210, 17912217, 17889583, 18202441, 17040764, 1747814516524926, 25655390, 19358317, 22148226, 18747196, 26544823, 1864141917036973, 18948177, 17811789, 16542886, 14285317, 18009564, 166186948322815, 16832076, 18247991, 16692232, 22507234, 17570240, 1387109224624166, 24348685, 17848897, 17441661, 14034426, 17465741, 1659689017437634, 21343897, 20506706, 21453153, 18339044, 17951233, 2232174121795111, 18430495, 21787056, 22380919, 19469538, 20506715, 1781142919721304, 17903598, 18230522, 19554106, 19458377, 21281607, 176128286599380, 22092979, 22321756, 17040527, 17811438, 18641461, 1465774013364795, 21387964, 19490948, 17346671, 17588480, 22351572, 1823539026474853, 18849970, 17889549, 19309466, 16472716, 20596234, 1833185018641451, 17344412, 21179898, 19461270, 17546761, 24842886, 1452184918203835, 18203838, 18964939, 18203837, 17313525, 22195457, 1813969016837842, 22296366, 14106803, 17842825, 21352646, 22657942, 1636011220657441, 22195441, 17389192, 26198926, 14565184, 17205719, 1844009514764829, 22195448, 14354737, 13944971, 16571443, 21868720, 1718690517080436, 18673342, 22905130, 17027426, 27374796, 19972569, 1997256820144308, 19972566, 17282229, 19972564, 16870214, 21629064, 1961513621354456, 17390431, 18762750, 23007241, 16613964, 17957017, 1809820718471685, 19730508, 21538485, 18264060, 17323222, 17754782, 1760071918317531, 17852463, 17596908, 17655634, 16228604, 27053456, 2007439119972570, 18090142, 18996843, 19854503, 16042673, 17835627, 2033434417393683, 20861693, 18000422, 17551709, 26575788, 23315889, 2050669919006849, 18277454, 18456514, 19174430, 17258090, 17174582, 2565493617242746, 16399083, 17824637, 21132297, 22465352, 17762296, 2216816317397545, 16450169, 12364061, 20067212, 18856999, 19211724, 1946389319463897, 21343775, 17853456, 18673304, 20004021, 26030218, 2166862716194160, 17477958, 16538760, 12982566, 24570598, 20828947, 1825903120296213, 18293054, 17610798, 19699191, 23065323, 17311728, 1813567818774543, 23294548, 16785708, 10136473, 24560906, 22551446, 1977786217786518, 18315328, 18334586, 12747740, 18096714, 19032867, 2164176017390160, 18899974, 17232014, 20598042, 18673325, 16422541, 1815576214015842, 19827973, 22683225, 17726838, 18554871, 23177648, 1805155620803583, 21972320, 15990359, 17922254, 18282562, 16855292, 1666858421343838, 20299015, 17446237, 18093615, 18043064, 23713236, 1769420917288409, 18308268, 20475845, 17274537, 13955826, 16934803, 1763492117501491, 16315398, 23725036, 22683212, 17006183, 13829543, 1819116417655240, 26746894, 22809871, 18384391, 19393542, 21538567, 1619814321847223, 25823754, 17892268, 20142975, 19584068, 17165204, 2516549618604493, 21756699, 18508861, 16901385, 18554763, 21532755, 1818903617443671, 17385178, 14829250, 17936109, 20925795, 20509482, 1747851427441326, 16850630, 13951456, 16595641, 14054676, 15861775, 2114283716912439, 17299889, 17297939, 23003979, 18619917, 16833527, 1779895317816865, 18607546, 17571306, 21286665, 17341326, 26910644, 1785116020558005, 17586955, 19049453, 21051840, 17587063, 16956380, 1832850925423453, 14133975, 18061914, 18522509, 21051833, 20294666, 1876560220860659, 20324049, 18199537, 17332800, 13609098, 22502493, 1838453714338435, 17945983, 16392068, 21067387, 17752995, 21051862, 1686342225505382, 17237521, 18244962, 19544839, 24433711, 24717859, 1715614818973907, 23026585, 17877323, 17449815, 18180390, 17088068, 1703713020004087, 21422580, 19466309, 11733603, 25505371, 21051858, 1808462518674024, 21051852, 18091059, 25369547, 16306373, 18306996, 1778725918193833, 19915271, 20513399, 20631274, 25879656, 16344544, 1469276218614015, 17346091, 18228645, 17721717, 18436307, 21756677, 1988885311883252, 17891943, 19475971, 22353199, 16384983, 19121551, 2782589312816846, 17982555, 17761775, 22243719, 17265217, 25505394, 1707172116721594, 18262334, 21756661, 17891946, 15913355, 17672719, 1760226917239687, 17042658, 17238511, 17811456, 17284817, 17752121, 2087988921380789, 17394950, 17011832, 16579084, 22195465, 14602788, 1832546024476265, 26569225, 24476274, 12611721, 16903536, 17006570, 1968997916043574, 18783224, 24662775, 16494615, 21526048, 17392698, 1919717516069901, 17811447, 27870645, 17308789, 22195477, 24835538, 1786567117343514, 19013183, 17325413, 18316692, 16180763, 17348614, 1436899521983325, 17393915, 16285691, 19211433, 20331945, 17883081, 1770502324316947, 17614227, 19578350, 22195485, 14084247, 13645875, 1677784019727057, 14852021, 18744139, 18674047, 17716305, 19285025, 1848250227534509, 17622427, 19289642, 22195492, 25947799, 14458214, 2086972121172913, 17767676, 18723434, 25505407, 17786278, 19258504, 1708298321351877, 17365043, 13498382, 18331812, 16065166, 25489607, 1668541718031668, 22893153, 16943711, 19272701, 21517440, 25897615, 1764926513866822, 18094246, 24528741, 17783588, 14245531, 17082359, 1828081320448824, 23330119, 16268425, 19487147, 25600421, 18018515, 1730227717215560, 24411921, 19271443, 25764020, 17016369, 20777150, 2333012416756406, 20441797, 19769489, 28100487, 17545847, 25093656, 1826055013853126, 17227277, 23536835, 25957038, 24652769, 19207117, 975627118868646, 17614134, 26667023, 17546973, 18704244, 19680952, 2666701517050888, 18828868, 18273830, 17360606, 16992075, 24563422, 1737535412905058, 18362222, 21429602, 27086138, 17571039, 17468141, 1843664717235750, 21168487, 16220077, 16929165--------------------------------------------------------------------------------OPatch succeeded.1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30.31.32.33.34.35.36.37.38.39.40.41.42.43.44.45.46.47.48.49.50.51.52.53.54.55.56.57.58.59.60.61.62.63.64.65.66.67.68.69.70.71.72.73.74.75.76.77.78.79.80.81.82.83.84.85.86.87.88.89.90.91.92.93.94.95.96.97.98.99.100.101.102.103.104.105.106.107.108.109.110.111.112.113.114.115.116.117.118.119.120.121.122.123.124.125.126.127.128. (7)启动数据库和监听器复制STARTUP
lsnrctl start LISTENER_DMCRM1.2. (8)运行补丁后脚本 复制cd $ORACLE_HOME/rdbms/admin
sqlplus / assysdba
@catbundle.sqlpsu apply
quit1.2.3.4. (9)编译无效对象 复制$ORACLE_HOME/rdbms/admin/utlrp.sql1. (10)检查补丁情况 复制select action_time,action from dba_registry_history;ACTION_TIME ACTION
--------------------------------------------------------------------------- ------------------------------21-APR-15 08.52.24.728992AM APPLY
08-OCT-18 09.43.41.923815AM APPLY
2 rows selected.1.2.3.4.5.6.本文分享了非RAC数据库的打补丁的详细过程,随手一记,以备不时之需。高防服务器
随机阅读
热门排行
友情链接