Oracle19c安装PSU补丁

Oracle19c安装PSU补丁

𝓓𝓸𝓷 Lv6
一、查看opatch版本
1
2
3
4
5
6
7
8
9
10
[oracle@virt OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.17

OPatch succeeded.

[oracle@virt OPatch]$ ./opatch lspatches
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)
29517242;Database Release Update : 19.3.0.0.190416 (29517242)

OPatch succeeded.
二、验证Oracle Inventory的有效性
1
[oracle@virt OPatch]$ ./opatch lsinventory -detail -oh $ORACLE_HOME
三、校验inventory.xml/comps.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[oracle@virt OPatch]$ ./opatch util LoadXML -xmlInput /opt/oracle11g/product/11.2.0/db_1/inventory/ContentsXML/comps.xml
Oracle Interim Patch Installer version 12.2.0.1.17
Copyright (c) 2020, Oracle Corporation. All rights reserved.


Oracle Home : /opt/oracle19c/product/19.3.0/db_1
Central Inventory : /opt/oracle19c/oraInventory
from : /opt/oracle19c/product/19.3.0/db_1/oraInst.loc
OPatch version : 12.2.0.1.17
OUI version : 12.2.0.7.0
Log file location : /opt/oracle19c/product/19.3.0/db_1/cfgtoollogs/opatch/opatch2020-04-11_09-15-38AM_1.log

Invoking utility "loadxml"
UtilSession: XML file is OK.

OPatch succeeded.
四、下载OPatch和RU

https://updates.oracle.com/download/6880880.html

Quick Reference to Patch Numbers for Database/GI PSU, SPU(CPU), Bundle Patches and Patchsets (文档 ID 1454618.1)

五、安装最新的OPatch
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
OPatch 12.2.0.1.19 for DB 19.x releases (Jan 2020):
p6880880_190000_LINUX.zip

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

[oracle@virt ~]$ cd $ORACLE_HOME
[oracle@virt db_1]$ mv OPatch OPatch.bak
[oracle@virt db_1]$ unzip /opt/soft/p6880880_190000_LINUX.zip -d .
[oracle@virt db_1]$ ll OPatch* -d
drwxr-x--- 14 oracle oinstall 4096 Dec 18 23:54 OPatch
drwxr-xr-x 14 oracle oinstall 4096 Apr 10 10:46 OPatch.bak

[oracle@virt db_1]$ cd OPatch
[oracle@virt OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.19

OPatch succeeded.

六、安装RU
1.检查补丁冲突
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
unzip p29834717_190000_Linux-x86-64.zip
cd 29834717

[oracle@virt 29834717]$ export PATH=$PATH:$ORACLE_HOME/OPatch

[oracle@virt 29834717]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.19
Copyright (c) 2020, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /opt/oracle19c/product/19.3.0/db_1
Central Inventory : /opt/oracle19c/oraInventory
from : /opt/oracle19c/product/19.3.0/db_1/oraInst.loc
OPatch version : 12.2.0.1.19
OUI version : 12.2.0.7.0
Log file location : /opt/oracle19c/product/19.3.0/db_1/cfgtoollogs/opatch/opatch2020-04-11_15-08-03PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.


note:Use My Oracle Support Document 1321267.1 Database Patch conflict resolution to determine, for each conflicting patch, whether a conflict resolution patch is already available, and if you need to request a new conflict resolution patch or if the conflict may be ignored.
2.安装
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
1.Patch Installation

[oracle@virt 29834717]$ pwd
/opt/soft/29834717
[oracle@virt 29834717]$ opatch apply
Oracle Interim Patch Installer version 12.2.0.1.19
Copyright (c) 2020, Oracle Corporation. All rights reserved.


Oracle Home : /opt/oracle19c/product/19.3.0/db_1
Central Inventory : /opt/oracle19c/oraInventory
from : /opt/oracle19c/product/19.3.0/db_1/oraInst.loc
OPatch version : 12.2.0.1.19
OUI version : 12.2.0.7.0
Log file location : /opt/oracle19c/product/19.3.0/db_1/cfgtoollogs/opatch/opatch2020-04-11_15-08-53PM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 29834717

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/opt/oracle19c/product/19.3.0/db_1')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '29834717' to OH '/opt/oracle19c/product/19.3.0/db_1'
ApplySession: Optional component(s) [ oracle.network.gsm, 19.0.0.0.0 ] , [ oracle.rdbms.ic, 19.0.0.0.0 ] , [ oracle.tfa, 19.0.0.0.0 ] , [ oracle.options.olap.awm, 19.0.0.0.0 ] , [ oracle.net.cman, 19.0.0.0.0 ] , [ oracle.nlsrtl.companion, 19.0.0.0.0 ] , [ oracle.assistants.asm, 19.0.0.0.0 ] , [ oracle.network.cman, 19.0.0.0.0 ] , [ oracle.assistants.usm, 19.0.0.0.0 ] , [ oracle.oraolap.mgmt, 19.0.0.0.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, 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.ctx.rsf, 19.0.0.0.0...

Patching component oracle.dbdev, 19.0.0.0.0...

Patching component oracle.ons, 19.0.0.0.0...

Patching component oracle.rdbms.util, 19.0.0.0.0...

Patching component oracle.rdbms.deconfig, 19.0.0.0.0...

Patching component oracle.rdbms.rman, 19.0.0.0.0...

Patching component oracle.odbc, 19.0.0.0.0...

Patching component oracle.network.client, 19.0.0.0.0...

Patching component oracle.oracore.rsf, 19.0.0.0.0...

Patching component oracle.xdk.parser.java, 19.0.0.0.0...

Patching component oracle.nlsrtl.rsf, 19.0.0.0.0...

Patching component oracle.dbjava.ucp, 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.oraolap.dbscripts, 19.0.0.0.0...

Patching component oracle.ldap.security.osdt, 19.0.0.0.0...

Patching component oracle.ldap.rsf.ic, 19.0.0.0.0...

Patching component oracle.xdk.rsf, 19.0.0.0.0...

Patching component oracle.network.listener, 19.0.0.0.0...

Patching component oracle.ovm, 19.0.0.0.0...

Patching component oracle.ctx.atg, 19.0.0.0.0...

Patching component oracle.install.deinstalltool, 19.0.0.0.0...

Patching component oracle.duma, 19.0.0.0.0...

Patching component oracle.sdo.locator, 19.0.0.0.0...

Patching component oracle.sdo.locator.jrf, 19.0.0.0.0...

Patching component oracle.rdbms.oci, 19.0.0.0.0...

Patching component oracle.ldap.owm, 19.0.0.0.0...

Patching component oracle.xdk, 19.0.0.0.0...

Patching component oracle.rdbms.install.plugins, 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.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...
Patch 29834717 successfully applied.
Sub-set patch [29517242] has become inactive due to the application of a super-set patch [29834717].
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: /opt/oracle19c/product/19.3.0/db_1/cfgtoollogs/opatch/opatch2020-04-11_15-08-53PM_1.log

OPatch succeeded.



2.Patch Post-Installation

SQL> startup
ORACLE instance started.

Total System Global Area 1593832624 bytes
Fixed Size 9135280 bytes
Variable Size 939524096 bytes
Database Buffers 637534208 bytes
Redo Buffers 7639040 bytes
Database mounted.
Database opened.

SQL> alter pluggable database all open;

Pluggable database altered.

SQL> exit

[oracle@virt 29834717]$ cd $ORACLE_HOME/OPatch

[oracle@virt OPatch]$ datapatch -verbose
3.编辑失效对象
1
2
3
4
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql
4.查询补丁
1
2
3
4
5
6
7
8
9
10
11
12
[oracle@virt admin]$ opatch lspatches

-----12c使用dba_registry_sqlpatch查看

set linesize 300
col description for a30
col action_time for a30
col status for a15
col version for a20
col action for a15
select PATCH_ID, PATCH_UID,ACTION, STATUS,ACTION_TIME,DESCRIPTION from dba_registry_sqlpatch;

5.更新rman catalog
1
2
3
4
$ rman catalog username/password@alias
RMAN> UPGRADE CATALOG;
RMAN> UPGRADE CATALOG;
RMAN> EXIT;
七、回滚RU
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
1.Deinstallation:

opatch rollback -id 29834717


2.Post-Deinstallation

% sqlplus /nolog
SQL> Connect / as sysdba
SQL> startup
SQL> alter pluggable database all open;
SQL> quit

% cd $ORACLE_HOME/OPatch
% ./datapatch -verbose
八、安装OJVM

https://updates.oracle.com/download/6880880.html

Quick Reference to Patch Numbers for Database/GI PSU, SPU(CPU), Bundle Patches and Patchsets (文档 ID 1454618.1)

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
安装步骤参考RU

1.检查补丁冲突
$ cd <PATCH_TOP_DIR>/29774421
$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./

2.Installation

$ cd <PATCH_TOP_DIR>/29774421
$ opatch apply

3.Postinstallation


SQL> startup upgrade
SQL> alter pluggable database all open upgrade;
SQL> quit

% cd $ORACLE_HOME/OPatch
% ./datapatch -verbose

SQL> shutdown
SQL> startup
SQL> alter pluggable database all open;


4.编辑失效对象

cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql

5.更新rman catalog

$ rman catalog username/password@alias
RMAN> UPGRADE CATALOG;
RMAN> UPGRADE CATALOG;
RMAN> EXIT;


6.查询补丁

[oracle@virt admin]$ opatch lspatches

-----12c使用dba_registry_sqlpatch查看

set linesize 300
col description for a30
col action_time for a30
col status for a15
col version for a20
col action for a15
select PATCH_ID, PATCH_UID,ACTION, STATUS,ACTION_TIME,DESCRIPTION from dba_registry_sqlpatch;
九、回滚OJVM

参考第七步回滚RU

  • Title: Oracle19c安装PSU补丁
  • Author: 𝓓𝓸𝓷
  • Created at : 2024-06-25 17:52:46
  • Updated at : 2024-07-20 05:15:41
  • Link: https://www.zhangdong.me/oracle19c-patch.html
  • License: This work is licensed under CC BY-NC-SA 4.0.
评论