내맘대로긍정이 알려주는
Oracle 23ai 신기능
무료 세미나 발표자료
다운로드
trending_flat
OS환경 : Oracle Linux 6.8 (64bit)
DB 환경 : Oracle Database 11.2.0.4
방법 : 오라클 11g R2 Single PSU 롤백 가이드
이전 게시물에서 PSU 패치한 것을 롤백 하는 내용
패치 내역 확인
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
|
SQL>
SET LINESIZE 400
COLUMN ACTION_TIME FORMAT A20
COLUMN ACTION FORMAT A20
COLUMN NAMESPACE FORMAT A20
COLUMN VERSION FORMAT A10
COLUMN COMMENTS FORMAT A30
COLUMN BUNDLE_SERIES FORMAT A10
SELECT TO_CHAR(ACTION_TIME, 'YYYYMMDD HH24:MI:SS') AS ACTION_TIME
,ACTION
,NAMESPACE
,VERSION
,ID
,COMMENTS
,BUNDLE_SERIES
FROM DBA_REGISTRY_HISTORY
ORDER BY ACTION_TIME
/
ACTION_TIME ACTION NAMESPACE VERSION ID COMMENTS BUNDLE_SER
-------------------- -------------------- -------------------- ---------- ---------- ------------------------------ ----------
20210321 06:57:05 APPLY SERVER 11.2.0.4 181016 PSU 11.2.0.4.181016 PSU
1 row selected.
|
11.2.0.4 181016 패치가 존재함
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
26
27
28
29
30
31
32
33
34
35
36
37
38
|
$ $ORACLE_HOME/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.28
Copyright (c) 2021, Oracle Corporation. All rights reserved.
Oracle Home : /oracle/app/oracle/product/11.2.0/db_1
Central Inventory : /oracle/app/oraInventory
from : /oracle/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.28
OUI version : 11.2.0.4.0
Log file location : /oracle/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2021-03-21_07-00-27AM_1.log
Lsinventory Output file location : /oracle/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2021-03-21_07-00-27AM.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: ORACLE11
ARU platform id: 226
ARU platform description:: Linux x86-64
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0
There are 1 products installed in this Oracle Home.
Interim patches (1) :
Patch 28204707 : applied on Sun Mar 21 06:47:14 KST 2021
Unique Patch ID: 22491169
Patch description: "Database Patch Set Update : 11.2.0.4.181016 (28204707)"
Created on 19 Sep 2018, 03:24:06 hrs PST8PDT
Sub-patch 27734982; "Database Patch Set Update : 11.2.0.4.180717 (27734982)"
Sub-patch 27338049; "Database Patch Set Update : 11.2.0.4.180417 (27338049)"
.
.
--------------------------------------------------------------------------------
OPatch succeeded.
|
11.2.0.4 181016 패치가 존재함
$ORACLE_HOME/rdbms/admin/catbundle_PSU_{database SID}_ROLLBACK.sql 파일 확인
1
2
3
4
5
6
7
|
$ ls -al $ORACLE_HOME/rdbms/admin/catbundle*
-rw-r--r--. 1 oracle dba 1307 Apr 8 2013 /oracle/app/oracle/product/11.2.0/db_1/rdbms/admin/catbundleapply.sql
-rw-r--r--. 1 oracle dba 673 Apr 8 2013 /oracle/app/oracle/product/11.2.0/db_1/rdbms/admin/catbundle_exa.sql
-rw-r-----. 1 oracle dba 2447 Mar 21 06:56 /oracle/app/oracle/product/11.2.0/db_1/rdbms/admin/catbundle_PSU_ORCL11_APPLY.sql
-rw-r-----. 1 oracle dba 2496 Mar 21 06:56 /oracle/app/oracle/product/11.2.0/db_1/rdbms/admin/catbundle_PSU_ORCL11_ROLLBACK.sql
-rw-r--r--. 1 oracle dba 669 Apr 8 2013 /oracle/app/oracle/product/11.2.0/db_1/rdbms/admin/catbundle_psu.sql
-rw-r--r--. 1 oracle dba 31577 Sep 19 2018 /oracle/app/oracle/product/11.2.0/db_1/rdbms/admin/catbundle.sql
|
존재함
해당 파일 실행 및 invalid object 검사
1
2
|
SQL> @?/rdbms/admin/catbundle_PSU_ORCL11_ROLLBACK.sql
SQL> @?/rdbms/admin/utlrp.sql
|
db, 리스너 종료
1
2
3
4
5
6
7
8
9
10
11
12
13
|
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
$ lsnrctl stop
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 21-MAR-2021 07:13:00
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ORACLE11)(PORT=1521)))
The command completed successfully
|
PSU 롤백
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
|
$ cd /home/oracle/media/28429134/27735020/
$ $ORACLE_HOME/OPatch/opatch rollback -id 28204707
Oracle Interim Patch Installer version 11.2.0.3.28
Copyright (c) 2021, Oracle Corporation. All rights reserved.
Oracle Home : /oracle/app/oracle/product/11.2.0/db_1
Central Inventory : /oracle/app/oraInventory
from : /oracle/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.28
OUI version : 11.2.0.4.0
Log file location : /oracle/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2021-03-21_07-14-12AM_1.log
Patches will be rolled back in the following order:
28204707 27734982 27338049 26925576 26392168 26609445 25869727
.
.
Is the local system ready for patching? [y|n]
y <-- [y 입력]
User Responded with: Y
.
.
OPatch found the word "warning" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
ins_emagent.mk:113: warning: overriding commands for target `nmosudo'
ins_emagent.mk:52: warning: ignoring old commands for target `nmosudo'
/oracle/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk:113: warning: overriding commands for target `nmosudo'
/oracle/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk:52: warning: ignoring old commands for target `nmosudo'
OPatch found the word "warning" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
ins_emagent.mk:113: warning: overriding commands for target `nmosudo'
ins_emagent.mk:52: warning: ignoring old commands for target `nmosudo'
/oracle/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk:113: warning: overriding commands for target `nmosudo'
/oracle/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk:52: warning: ignoring old commands for target `nmosudo'
OPatch Session completed with warnings.
Log file location: /oracle/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2021-03-21_07-14-12AM_1.log
OPatch completed with warnings.
|
경고 메세지가 발생했지만 롤백이 완료됨
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
26
27
28
29
30
31
|
$ $ORACLE_HOME/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.28
Copyright (c) 2021, Oracle Corporation. All rights reserved.
Oracle Home : /oracle/app/oracle/product/11.2.0/db_1
Central Inventory : /oracle/app/oraInventory
from : /oracle/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.28
OUI version : 11.2.0.4.0
Log file location : /oracle/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2021-03-21_07-17-46AM_1.log
Lsinventory Output file location : /oracle/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2021-03-21_07-17-46AM.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: ORACLE11
ARU platform id: 226
ARU platform description:: Linux x86-64
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0
There are 1 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
--------------------------------------------------------------------------------
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
25
|
SQL>
SET LINESIZE 400
COLUMN ACTION_TIME FORMAT A20
COLUMN ACTION FORMAT A20
COLUMN NAMESPACE FORMAT A20
COLUMN VERSION FORMAT A10
COLUMN COMMENTS FORMAT A30
COLUMN BUNDLE_SERIES FORMAT A10
SELECT TO_CHAR(ACTION_TIME, 'YYYYMMDD HH24:MI:SS') AS ACTION_TIME
,ACTION
,NAMESPACE
,VERSION
,ID
,COMMENTS
,BUNDLE_SERIES
FROM DBA_REGISTRY_HISTORY
ORDER BY ACTION_TIME
/
ACTION_TIME ACTION NAMESPACE VERSION ID COMMENTS BUNDLE_SER
-------------------- -------------------- -------------------- ---------- ---------- ------------------------------ ----------
20210321 06:57:05 APPLY SERVER 11.2.0.4 181016 PSU 11.2.0.4.181016 PSU
20210321 07:10:58 ROLLBACK SERVER 11.2.0.4 181016 PSU 11.2.0.4.181016 PSU
20210321 07:11:11 APPLY SERVER 11.2.0.4 181016 PSU 11.2.0.4.181016 PSU
|
롤백을 했으나 1분 뒤에 다시 PSU를 적용한것으로 표시됨
롤백 sql 다시 실행 후 확인
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
|
SQL> @?/rdbms/admin/catbundle_PSU_ORCL11_ROLLBACK.sql
SQL> @?/rdbms/admin/utlrp.sql
SQL>
SET LINESIZE 400
COLUMN ACTION_TIME FORMAT A20
COLUMN ACTION FORMAT A20
COLUMN NAMESPACE FORMAT A20
COLUMN VERSION FORMAT A10
COLUMN COMMENTS FORMAT A30
COLUMN BUNDLE_SERIES FORMAT A10
SELECT TO_CHAR(ACTION_TIME, 'YYYYMMDD HH24:MI:SS') AS ACTION_TIME
,ACTION
,NAMESPACE
,VERSION
,ID
,COMMENTS
,BUNDLE_SERIES
FROM DBA_REGISTRY_HISTORY
ORDER BY ACTION_TIME
/
ACTION_TIME ACTION NAMESPACE VERSION ID COMMENTS BUNDLE_SER
-------------------- -------------------- -------------------- ---------- ---------- ------------------------------ ----------
20210321 06:57:05 APPLY SERVER 11.2.0.4 181016 PSU 11.2.0.4.181016 PSU
20210321 07:10:58 ROLLBACK SERVER 11.2.0.4 181016 PSU 11.2.0.4.181016 PSU
20210321 07:11:11 APPLY SERVER 11.2.0.4 181016 PSU 11.2.0.4.181016 PSU
20210321 07:20:16 ROLLBACK SERVER 11.2.0.4 181016 PSU 11.2.0.4.181016 PSU
20210321 07:20:16 APPLY SERVER 11.2.0.4 0 Patchset 11.2.0.2.0 PSU
5 rows selected.
|
롤백 sql을 다시 실행 한 뒤 정상적으로 표시됨
참조 : 28204707 readme 문서
'ORACLE > Install' 카테고리의 다른 글
Oracle Linux 7.6에 Oracle 19c RAC 삭제 가이드 (2) | 2021.05.21 |
---|---|
Oracle 11g R2 RAC PSU 패치 가이드 (0) | 2021.04.17 |
Oracle 11g R2 Single PSU 패치 가이드 (0) | 2021.03.20 |
Oracle Linux 6.8에 Oracle 11g R2 ADG 설치 가이드 (2) | 2020.12.12 |
Oracle Linux 7.6에 Oracle 21c 클라이언트 설치 가이드 (0) | 2020.12.12 |