복사되었습니다!
OS환경 : Oracle Linux 7.5 (64bit)
DB 환경 : Oracle Database 19.3.0.0
방법 : Oracle 19c SINGLE OPatch Release Update Rollback 가이드
Oracle 19c SINGLE OPatch Release Update 적용 방법( https://positivemh.tistory.com/551 )
이후 적용한 패치를 삭제하고 싶은 경우 아래와 같이 작업하면됨
| rollback 대상 패치명 | 패치번호 | 패치대상 |
| Database Release Update : 19.7.0.0.200414 | 30869156 | DB |
| OJVM RELEASE UPDATE: 19.7.0.0.200414 | 30805684 | OJVM |
롤백 전 패치 확인
|
1
2
3
4
5
6
|
$ $ORACLE_HOME/OPatch/opatch lspatches -oh $ORACLE_HOME
30805684;OJVM RELEASE UPDATE: 19.7.0.0.200414 (30805684)
30869156;Database Release Update : 19.7.0.0.200414 (30869156)
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)
OPatch succeeded.
|
DB, 리스너 모두 종료
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
$ lsnrctl stop
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 02-JUN-2020 23:29:23
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oel7)(PORT=1521)))
The command completed successfully
$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Tue Jun 2 23:29:28 2020
Version 19.7.0.0.0
Copyright (c) 1982, 2020, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production
Version 19.7.0.0.0
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
|
DB 패치 30869156 롤백 명령 실행
|
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
|
$ $ORACLE_HOME/OPatch/opatch rollback -id 30869156
Oracle Interim Patch Installer version 12.2.0.1.19
Copyright (c) 2020, Oracle Corporation. All rights reserved.
Oracle Home : /app/oracle/product/19c
Central Inventory : /app/oraInventory
from : /app/oracle/product/19c/oraInst.loc
OPatch version : 12.2.0.1.19
OUI version : 12.2.0.7.0
Log file location : /app/oracle/product/19c/cfgtoollogs/opatch/opatch2020-06-02_23-34-33PM_1.log
Patches will be rolled back in the following order:
30869156
The following patch(es) will be rolled back: 30869156
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/app/oracle/product/19c')
Is the local system ready for patching? [y|n]
y <-- y입력
User Responded with: Y
Rolling back patch 30869156...
RollbackSession rolling back interim patch '30869156' from OH '/app/oracle/product/19c'
Patching component oracle.rdbms.rsf, 19.0.0.0.0...
Deleting "kubsbufio.o" from archive "/app/oracle/product/19c/lib/libclient19.a"
Deleting "kubscrf.o" from archive "/app/oracle/product/19c/lib/libclient19.a"
Deleting "psdufa.o" from archive "/app/oracle/product/19c/lib/libplc19_pic.a"
Deleting "qesxldsb.o" from archive "/app/oracle/product/19c/lib/libcommon19.a"
Deleting "qesdsbc.o" from archive "/app/oracle/product/19c/lib/libcommon19.a"
Deleting "skfparity.o" from archive "/app/oracle/product/19c/lib/libcommon19.a"
Deleting "skgrlib.o" from archive "/app/oracle/product/19c/lib/libgeneric19.a"
Deleting "skgrlib_ipcdat.o" from archive "/app/oracle/product/19c/lib/libgeneric19.a"
Deleting "skgzepclib.o" from archive "/app/oracle/product/19c/lib/libgeneric19.a"
Deleting "skgzibr.o" from archive "/app/oracle/product/19c/lib/libgeneric19.a"
Deleting "pef.o" from archive "/app/oracle/product/19c/lib/libpls19_pic.a"
Deleting "pevmexe.o" from archive "/app/oracle/product/19c/lib/libpls19_pic.a"
Deleting "ph2o.o" from archive "/app/oracle/product/19c/lib/libpls19_pic.a"
Deleting "pfrobj.o" from archive "/app/oracle/product/19c/lib/libpls19_pic.a"
Deleting "per.o" from archive "/app/oracle/product/19c/lib/libpls19_pic.a"
Deleting "ph2ima.o" from archive "/app/oracle/product/19c/lib/libpls19_pic.a"
Deleting "ph2imb.o" from archive "/app/oracle/product/19c/lib/libpls19_pic.a"
Deleting "pfrrun.o" from archive "/app/oracle/product/19c/lib/libpls19_pic.a"
Deleting "pkl.o" from archive "/app/oracle/product/19c/lib/libpls19_pic.a"
Deleting "ph2oa.o" from archive "/app/oracle/product/19c/lib/libpls19_pic.a"
Deleting "pk.o" from archive "/app/oracle/product/19c/lib/libpls19_pic.a"
Patching component oracle.rdbms, 19.0.0.0.0...
Deleting "kqro.o" from archive "/app/oracle/product/19c/lib/libserver19.a"
Deleting "kpdbapx.o" from archive "/app/oracle/product/19c/lib/libserver19.a"
Deleting "kubsd.o" from archive "/app/oracle/product/19c/lib/libserver19.a"
Patching component oracle.rdbms.util, 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.dbjava.ic, 19.0.0.0.0...
Patching component oracle.nlsrtl.rsf, 19.0.0.0.0...
Patching component oracle.dbjava.jdbc, 19.0.0.0.0...
Patching component oracle.dbdev, 19.0.0.0.0...
Patching component oracle.network.client, 19.0.0.0.0...
Patching component oracle.xdk.parser.java, 19.0.0.0.0...
Patching component oracle.rdbms.deconfig, 19.0.0.0.0...
Patching component oracle.oracore.rsf, 19.0.0.0.0...
Patching component oracle.rdbms.lbac, 19.0.0.0.0...
Patching component oracle.ldap.rsf.ic, 19.0.0.0.0...
Patching component oracle.ldap.security.osdt, 19.0.0.0.0...
Patching component oracle.ons, 19.0.0.0.0...
Patching component oracle.sdo.locator, 19.0.0.0.0...
Patching component oracle.rdbms.install.plugins, 19.0.0.0.0...
Patching component oracle.marvel, 19.0.0.0.0...
Patching component oracle.rdbms.install.common, 19.0.0.0.0...
Patching component oracle.install.deinstalltool, 19.0.0.0.0...
Patching component oracle.xdk.rsf, 19.0.0.0.0...
Deleting "jznpathval.o" from archive "/app/oracle/product/19c/lib/libxml19.a"
Deleting "jzntrans.o" from archive "/app/oracle/product/19c/lib/libxml19.a"
Patching component oracle.rdbms.oci, 19.0.0.0.0...
Patching component oracle.rdbms.drdaas, 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.xdk, 19.0.0.0.0...
Patching component oracle.sqlplus.ic, 19.0.0.0.0...
Patching component oracle.odbc, 19.0.0.0.0...
Patching component oracle.oraolap.dbscripts, 19.0.0.0.0...
Patching component oracle.ldap.owm, 19.0.0.0.0...
Patching component oracle.bali.ice, 11.1.1.7.0...
Patching component oracle.ctx.rsf, 19.0.0.0.0...
Patching component oracle.ovm, 19.0.0.0.0...
Patching component oracle.rdbms.rman, 19.0.0.0.0...
Patching component oracle.dbjava.ucp, 19.0.0.0.0...
Patching component oracle.rdbms.dv, 19.0.0.0.0...
Patching component oracle.duma, 19.0.0.0.0...
Patching component oracle.network.listener, 19.0.0.0.0...
Patching component oracle.oraolap, 19.0.0.0.0...
Patching component oracle.sdo.locator.jrf, 19.0.0.0.0...
Patching component oracle.rdbms.scheduler, 19.0.0.0.0...
Patching component oracle.rdbms.crs, 19.0.0.0.0...
Patching component oracle.rdbms.rsf.ic, 19.0.0.0.0...
Patching component oracle.precomp.common, 19.0.0.0.0...
Patching component oracle.nlsrtl.rsf.core, 19.0.0.0.0...
Patching component oracle.perlint, 5.28.1.0.0...
Patching component oracle.precomp.lang, 19.0.0.0.0...
Patching component oracle.jdk, 1.8.0.201.0...
RollbackSession removing interim patch '30869156' from inventory
Inactive sub-set patch [29517242] has become active due to the rolling back of a super-set patch [30869156].
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: /app/oracle/product/19c/cfgtoollogs/opatch/opatch2020-06-02_23-34-33PM_1.log
OPatch succeeded.
|
OJVM 패치 30805684 롤백 명령 실행
|
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
|
$ $ORACLE_HOME/OPatch/opatch rollback -id 30805684
Oracle Interim Patch Installer version 12.2.0.1.19
Copyright (c) 2020, Oracle Corporation. All rights reserved.
Oracle Home : /app/oracle/product/19c
Central Inventory : /app/oraInventory
from : /app/oracle/product/19c/oraInst.loc
OPatch version : 12.2.0.1.19
OUI version : 12.2.0.7.0
Log file location : /app/oracle/product/19c/cfgtoollogs/opatch/opatch2020-06-02_23-37-43PM_1.log
Patches will be rolled back in the following order:
30805684
The following patch(es) will be rolled back: 30805684
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/app/oracle/product/19c')
Is the local system ready for patching? [y|n]
y <-- y입력
User Responded with: Y
Rolling back patch 30805684...
RollbackSession rolling back interim patch '30805684' from OH '/app/oracle/product/19c'
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...
RollbackSession removing interim patch '30805684' from inventory
Log file location: /app/oracle/product/19c/cfgtoollogs/opatch/opatch2020-06-02_23-37-43PM_1.log
OPatch succeeded.
|
롤백 후 패치 확인
|
1
2
3
4
5
|
$ $ORACLE_HOME/OPatch/opatch lspatches -oh $ORACLE_HOME
29585399;OCW RELEASE UPDATE 19.3.0.0.0 (29585399)
29517242;Database Release Update : 19.3.0.0.190416 (29517242)
OPatch succeeded.
|
lspatches 에는 19.7이 정상적으로 제거됨
DB 기동
|
1
2
3
4
5
6
7
8
9
10
|
SQL> startup
ORACLE instance started.
Total System Global Area 1660940992 bytes
Fixed Size 8897216 bytes
Variable Size 1040187392 bytes
Database Buffers 603979776 bytes
Redo Buffers 7876608 bytes
Database mounted.
Database opened.
|
OPatch 경로로 이동 후 datapatch -verbose 명령 실행
|
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
|
$ ./datapatch -verbose
SQL Patching tool version 19.3.0.0.0 Production on Tue Jun 2 23:51:13 2020
Copyright (c) 2012, 2019, Oracle. All rights reserved.
Log file for this invocation: /app/oracle/cfgtoollogs/sqlpatch/sqlpatch_16143_2020_06_02_23_51_13/sqlpatch_invocation.log
Connecting to database...OK
Gathering database info...done
Bootstrapping registry and package to current versions...done
Determining current state...done
Current state of interim SQL patches:
Interim patch 30805684 (OJVM RELEASE UPDATE: 19.7.0.0.200414 (30805684)):
Binary registry: Not installed
SQL registry: Applied successfully on 02-JUN-20 05.09.32.951511 PM
Current state of release update SQL patches:
Binary registry:
19.3.0.0.0 Release_Update 190410122720: Installed
SQL registry:
Applied 19.7.0.0.0 Release_Update 200404035018 successfully on 02-JUN-20 05.09.32.947144 PM
Adding patches to installation queue and performing prereq checks...done
Installation queue:
The following interim patches will be rolled back:
30805684 (OJVM RELEASE UPDATE: 19.7.0.0.200414 (30805684))
Patch 30869156 (Database Release Update : 19.7.0.0.200414 (30869156)):
Rollback from 19.7.0.0.0 Release_Update 200404035018 to 19.3.0.0.0 Release_Update 190410122720
No interim patches need to be applied
Installing patches...
Patch installation complete. Total patches installed: 2
Validating logfiles...done
Patch 30805684 rollback: SUCCESS
logfile: /app/oracle/cfgtoollogs/sqlpatch/30805684/23401476/30805684_rollback_ORCL_2020Jun02_23_51_28.log (no errors)
Patch 30869156 rollback: SUCCESS
logfile: /app/oracle/cfgtoollogs/sqlpatch/30869156/23493838/30869156_rollback_ORCL_2020Jun02_23_51_49.log (no errors)
SQL Patching tool complete on Tue Jun 2 23:53:01 2020
|
롤백 성공 메세지가 나옴
DBA_REGISTRY_SQLPATCH 뷰로 롤백 내역 조회
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
SQL>
SET LINESIZE 400
COLUMN ACTION_TIME FORMAT A20
COLUMN ACTION FORMAT A10
COLUMN STATUS FORMAT A10
COLUMN DESCRIPTION FORMAT A60
COLUMN VERSION FORMAT A10
SELECT TO_CHAR(ACTION_TIME, 'YYYYMMDD HH24:MI:SS') AS ACTION_TIME
,ACTION
,STATUS
,DESCRIPTION
,SOURCE_VERSION
,TARGET_VERSION
,PATCH_ID
FROM DBA_REGISTRY_SQLPATCH
ORDER BY ACTION_TIME
/
ACTION_TIME ACTION STATUS DESCRIPTION SOURCE_VERSION TARGET_VERSION PATCH_ID
-------------------- ---------- ---------- ------------------------------------------------------------ --------------- --------------- ----------
20200602 17:09:32 APPLY SUCCESS OJVM RELEASE UPDATE: 19.7.0.0.200414 (30805684) 19.1.0.0.0 19.1.0.0.0 30805684
20200602 17:09:32 APPLY SUCCESS Database Release Update : 19.7.0.0.200414 (30869156) 19.1.0.0.0 19.7.0.0.0 30869156
20200602 23:52:59 ROLLBACK SUCCESS OJVM RELEASE UPDATE: 19.7.0.0.200414 (30805684) 19.3.0.0.0 19.3.0.0.0 30805684
20200602 23:52:59 ROLLBACK SUCCESS Database Release Update : 19.7.0.0.200414 (30869156) 19.7.0.0.0 19.3.0.0.0 30869156
|
정상적으로 표시됨
롤백 로그 확인
|
1
2
3
4
5
6
7
8
9
|
$ cd/app/oracle/cfgtoollogs/sqlpatch/30869156/23493838
$ ls -al
total 10636
drwxr-x--- 2 oracle dba 4096 Jun 2 23:51 .
drwxr-x--- 3 oracle dba 22 Jun 2 17:08 ..
-rw-r----- 1 oracle dba 7970087 Jun 2 17:09 30869156_apply_ORCL_2020Jun02_17_08_35.log
-rw-r--r-- 1 oracle dba 1052253 Jun 2 23:52 30869156_rollback_ORCL_2020Jun02_23_51_49.log
-rw-r----- 1 oracle dba 931908 Jun 2 17:09 30869156_ru_apply_ORCL_2020Jun02_17_08_34.log
-rw-r--r-- 1 oracle dba 928927 Jun 2 23:52 30869156_ru_rollback_ORCL_2020Jun02_23_51_27.log
|
해당 폴더로 이동 후 로그 확인
datapatch 실행 후 invalid 오브젝트가있는 경우 utlrp.sql을 실행해야함
|
1
|
SQL> @?/rdbms/admin/utlrp.sql
|
참조 :
https://positivemh.tistory.com/551
https://positivemh.tistory.com/579
https://positivemh.tistory.com/175
Patch 30869156 Readme 문서
Patch 30805684 Readme 문서
'ORACLE > Install' 카테고리의 다른 글
| Windows Server 2016에 Oracle 11g R2 설치 가이드 (14) | 2020.07.08 |
|---|---|
| Oracle Linux 7.6에 Oracle 19c 삭제 가이드 (4) | 2020.06.18 |
| Redhat Linux 7.5에 Oracle 19c 설치시 compat-libstdc++-33-3.2.3 패키지 (0) | 2020.05.06 |
| Oracle Linux 7.6에 Oracle 19c 설치 가이드 (19) | 2020.04.26 |
| Oracle 19c SINGLE OPatch Release Update 적용 가이드 (2) | 2020.04.24 |