내맘대로긍정이 알려주는
Oracle 23ai 신기능
무료 세미나 발표자료
다운로드
trending_flat
OS환경 : Oracle Linux 6.8 (64bit)
DB 환경 : Oracle Database 11.2.0.4
방법 : 오라클 11g R2 Single PSU 패치 가이드
11.2.0.4 기본 설치만 되어있는 db에 181016 PSU를 적용하는 내용
Patch 28204707 - DATABASE PATCH SET UPDATE 11.2.0.4.181016
패치파일 support.oracle.com/ 에서 다운로드 후 진행
기존 패치 내역 확인
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
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:15:20 APPLY SERVER 11.2.0.4 0 Patchset 11.2.0.2.0 PSU
|
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
|
$ cd $ORACLE_HOME/OPatch/
$ ./opatch lsinventory Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, 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.4
OUI version : 11.2.0.4.0
Log file location : /oracle/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2021-03-21_06-21-34AM_1.log
Lsinventory Output file location : /oracle/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2021-03-21_06-21-34AM.txt
--------------------------------------------------------------------------------
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.
|
PSU 패치 내역이 없음
최신 OPatch, PSU 파일 업로드
1
2
3
4
5
6
|
$ ls -al /home/oracle/media/
total 1033132
drwxr-xr-x 2 oracle dba 4096 Mar 21 06:30 .
drwx------. 13 oracle dba 4096 Mar 21 06:30 ..
-rw-r--r-- 1 oracle dba 935171743 Mar 21 06:29 p28429134_112040_Linux-x86-64.zip
-rw-r--r-- 1 oracle dba 122739146 Mar 21 06:29 p6880880_112000_Linux-x86-64.zip
|
OPatch 최신버전으로 교체
1
2
3
4
5
6
7
8
9
10
11
12
|
$ cd $ORACLE_HOME/
$ mv OPatch/ OPatchbak $ unzip /home/oracle/media/p6880880_112000_Linux-x86-64.zip
$ cd $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
|
기존 OPatch version : 11.2.0.3.4 에서 OPatch version : 11.2.0.3.28 로 교체됨
기존 invalid object 확인
1
2
3
4
5
|
SQL> select count(*) from dba_objects where status!='VALID';
COUNT(*)
----------
0
|
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 06:37:38
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
|
$ cd /home/oracle/media
$ unzip p28429134_112040_Linux-x86-64.zip
$ cd 28429134/28204707
|
OPatch Prereq 체크(일회성 패치와 PSU 가 충돌나는지 확인)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 11.2.0.3.28
Copyright (c) 2021, Oracle Corporation. All rights reserved.
PREREQ session
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_06-41-11AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
|
정상
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
47
48
49
50
51
|
$ cd /home/oracle/media/28429134/28204707
$ $ORACLE_HOME/OPatch/opatch apply
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_06-45-21AM_1.log
Verifying environment and performing 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 27734982 28204707
Do you want to proceed? [y|n]
y <-- [y 입력]
User Responded with: Y
All checks passed.
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/oracle/app/oracle/product/11.2.0/db_1')
Is the local system ready for patching? [y|n]
y <-- [y 입력]
User Responded with: Y
Backing up files...
Applying sub-patch '17478514' to OH '/oracle/app/oracle/product/11.2.0/db_1'
Patching component oracle.rdbms, 11.2.0.4.0...
Patching component oracle.rdbms.rsf, 11.2.0.4.0...
.
.
.
Patching component oracle.ctx, 11.2.0.4.0...
OPatch found the word "error" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
chmod: changing permissions of /oracle/app/oracle/product/11.2.0/db_1/bin/extjobO: Operation not permitted
make: [iextjob] Error 1 (ignored)
Composite patch 28204707 successfully applied.
OPatch Session completed with warnings.
Log file location: /oracle/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2021-03-21_06-45-21AM_1.log
OPatch completed with warnings.
|
마지막에 경고메세지가 발생했지만 패치가 완료됨
수정(패치)된 sql 파일을 db에도 적용 및 invalid object 검사
1
2
|
SQL> @?/rdbms/admin/catbundle.sql psu apply
SQL> @?/rdbms/admin/utlrp.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
|
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.
|
db 내에서 정상적으로 패치내역이 확인됨
invalid object 확인
1
2
3
4
5
|
SQL> select count(*) from dba_objects where status!='VALID';
COUNT(*)
----------
0
|
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.
|
정상적으로 패치내역이 확인됨
참조 : 28204707 readme 문서
'ORACLE > Install' 카테고리의 다른 글
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 |
Windows 10에 Oracle 12c R1 클라이언트 설치 가이드 (3) | 2020.08.07 |