반응형
■ [2025-09-11] Oracle 12cR2 2Node RAC 환경에서 최신의 PSU 패치 적용 및 패치 롤백

 

[2025-09-11] Oracle 12cR2 2Node RAC 환경에서 최신의 PSU 패치 적용 및 패치 롤백

 

Oracle 12cR2 2Node RAC 환경을 구축 한 직 후
최신의 PSU 패치 JAN2022 (12.2.0.1.220118)를 적용 후 롤백하는 실습을 진행함

 

-----------------------테스트 시작 전 각 os user의 환경 변수를 숙지하고 시작할 것 시작-------------------

--초심자를 위한 배려임

--2개의 노드 모두 값이 동일함

 

--root os user

[root@ol7ora12r11][/root]$ echo $DB_HOME
/u01/app/oracle/product/12c/db_1
[root@ol7ora12r11][/root]$ echo $GRID_HOME
/u01/app/12c/grid

 

--grid os user

[+ASM1:grid@ol7ora12r11][/home/grid]$ echo $GRID_HOME
/u01/app/12c/grid
[+ASM1:grid@ol7ora12r11][/home/grid]$ echo $ORACLE_HOME
/u01/app/12c/grid
[+ASM1:grid@ol7ora12r11][/home/grid]$ echo $DB_HOME
/u01/app/oracle/product/12c/db_1

 

--oracle os user

[ORA12R11:oracle@ol7ora12r11][/home/oracle]$ echo $GRID_HOME
/u01/app/12c/grid
[ORA12R11:oracle@ol7ora12r11][/home/oracle]$ echo $ORACLE_HOME
/u01/app/oracle/product/12c/db_1
[ORA12R11:oracle@ol7ora12r11][/home/oracle]$ echo $DB_HOME
/u01/app/oracle/product/12c/db_1
-----------------------테스트 시작 전 각 os user의 환경 변수를 숙지하고 시작할 것 종료-------------------

[실습 환경]

OS : Oracle Linux Server 7.9 (Linux ol7ora12r11 5.4.17-2102.201.3.el7uek.x86_64)
DB : Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
RAC1 : ol7ora12r11(192.168.240.11) : ORA12R11
RAC2 : ol7ora12r12(192.168.240.12) : ORA12R12

 

1. Opatch download

 

https://updates.oracle.com/download/6880880.html 로 접속

OPatch 12.2.0.1.42 for DB 12.2.0.1.0 (Apr 2024)
Select a Release : OPatch 12.2.0.1.0
Platform or Language : Linux x86-64
Download 버튼
p6880880_122010_Linux-x86-64.zip 파일을 다운로드

 

2. 12cr2 PSU 최신 패치 다운로드

 

Oracle Database Release Updates (RUs) 선택
12.2.0.1 선택
JAN2022 (12.2.0.1.220118) : GI Update 33583921 선택
Linux x86-64 선택
p33583921_122010_Linux-x86-64.zip 파일을 다운로드 하게됨

 

3. 1번과 2번에서 다운로드 받은 패치(zip파일)을 각각의 서버(노드)에 업로드

 

--RAC 1번 노드
[root@ol7ora12r11][/root]$ mkdir -pv /tmp/patch
mkdir: created directory ‘/tmp/patch’

--> 해당 위치에 패치 파일 업로드

 

-- 업로드한 파일 확인
[root@ol7ora12r11][/root]$ ls -l /tmp/patch
total 2467460
-rw-r--r--. 1 root root 2393137641 Sep 11 18:29 p33583921_122010_Linux-x86-64.zip
-rw-r--r--. 1 root root  133535622 Sep 11 18:21 p6880880_122010_Linux-x86-64.zip

[root@ol7ora12r11][/root]$ chmod -R 777 /tmp/patch

 

--RAC 2번 노드
[root@ol7ora12r11][/root]$ mkdir -pv /tmp/patch
mkdir: created directory ‘/tmp/patch’
--> 해당 위치에 패치 파일 업로드

 

-- 업로드한 파일 확인
[root@ol7ora12r12][/root]$ ls -l /tmp/patch
total 2467460
-rw-r--r--. 1 root root 2393137641 Sep 11 18:31 p33583921_122010_Linux-x86-64.zip
-rw-r--r--. 1 root root  133535622 Sep 11 18:31 p6880880_122010_Linux-x86-64.zip

[root@ol7ora12r12][/root]$ chmod -R 777 /tmp/patch

 

4. OPatch 설치

 

4-1. grid opatch 설치

 

--RAC 1번 노드

[root@ol7ora12r11][/root]$ echo $GRID_HOME
/u01/app/12c/grid
[root@ol7ora12r11][/root]$ mv $GRID_HOME/OPatch $GRID_HOME/OPatch.bak.20250911
[root@ol7ora12r11][/root]$ unzip /tmp/patch/p6880880_122010_Linux-x86-64.zip -d $GRID_HOME

 

--root 권한으로 압축을 해제했으므로 owner를 바꿔줘야함
--실수할 가능성을 차단하기 위해서 직접 디렉토리로 가서 작업해줌 (절대경로로 권한 바꾸지 않음)

[root@ol7ora12r11][/root]$ echo $GRID_HOME
/u01/app/12c/grid

[root@ol7ora12r11][/root]$ cd $GRID_HOME
[root@ol7ora12r11][/u01/app/12c/grid]$ chown grid:oinstall ./OPatch
[root@ol7ora12r11][/u01/app/12c/grid]$ cd OPatch
[root@ol7ora12r11][/u01/app/12c/grid/OPatch]$ chown -R grid:oinstall *
--> chown 작업 시에는 항상 주의 할 것 -R 옵션 사용시에는 더더욱 조심해야함

 

--grid os user로 opatch 버전 확인
[+ASM1:grid@ol7ora12r11][/home/grid]$ which opatch
/u01/app/12c/grid/OPatch/opatch

[+ASM1:grid@ol7ora12r11][/home/grid]$ opatch version
OPatch Version: 12.2.0.1.42

OPatch succeeded.
--> opatch 설치 완료됨

 

--RAC 2번 노드

[root@ol7ora12r12][/root]$ echo $GRID_HOME
/u01/app/12c/grid

[root@ol7ora12r12][/root]$ mv $GRID_HOME/OPatch $GRID_HOME/OPatch.bak.20250911
[root@ol7ora12r12][/root]$ unzip /tmp/patch/p6880880_122010_Linux-x86-64.zip -d $GRID_HOME

 

--root 권한으로 압축을 해제했으므로 owner를 바꿔줘야함
--실수할 가능성을 차단하기 위해서 직접 디렉토리로 가서 작업해줌 (절대경로로 권한 바꾸지 않음)

[root@ol7ora12r12][/root]$ echo $GRID_HOME
/u01/app/12c/grid

[root@ol7ora12r12][/root]$ cd $GRID_HOME
[root@ol7ora12r12][/u01/app/12c/grid]$ chown grid:oinstall ./OPatch
[root@ol7ora12r12][/u01/app/12c/grid]$ cd OPatch
[root@ol7ora12r12][/u01/app/12c/grid/OPatch]$ chown -R grid:oinstall *
--> chown 작업 시에는 항상 주의 할 것 -R 옵션 사용시에는 더더욱 조심해야함

 

--grid os user로 opatch 버전 확인
[+ASM1:grid@ol7ora12r11][/home/grid]$ which opatch
/u01/app/12c/grid/OPatch/opatch

[+ASM1:grid@ol7ora12r11][/home/grid]$ opatch version
OPatch Version: 12.2.0.1.42

OPatch succeeded.
--> opatch 설치 완료됨

 

4-2. oracle opatch 설치 (oracle os user)

 

--RAC 1번 노드

[ORA12R11:oracle@ol7ora12r11][/home/oracle]$ echo $ORACLE_HOME
/u01/app/oracle/product/12c/db_1
[ORA12R11:oracle@ol7ora12r11][/home/oracle]$ cd $ORACLE_HOME
[ORA12R11:oracle@ol7ora12r11][/u01/app/oracle/product/12c/db_1]$ mv OPatch OPatch.bak.20250911
[ORA12R11:oracle@ol7ora12r11][/u01/app/oracle/product/12c/db_1]$ unzip /tmp/patch/p6880880_122010_Linux-x86-64.zip -d $ORACLE_HOME

[ORA12R11:oracle@ol7ora12r11][/u01/app/oracle/product/12c/db_1]$ which opatch
/u01/app/oracle/product/12c/db_1/OPatch/opatch

[ORA12R11:oracle@ol7ora12r11][/u01/app/oracle/product/12c/db_1]$ opatch version
OPatch Version: 12.2.0.1.42

OPatch succeeded.

 

--RAC 2번 노드

[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ echo $ORACLE_HOME
/u01/app/oracle/product/12c/db_1
[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ cd $ORACLE_HOME
[ORA12R12:oracle@ol7ora12r12][/u01/app/oracle/product/12c/db_1]$ mv OPatch OPatch.bak.20250911
[ORA12R12:oracle@ol7ora12r12][/u01/app/oracle/product/12c/db_1]$ unzip /tmp/patch/p6880880_122010_Linux-x86-64.zip -d $ORACLE_HOME

[ORA12R12:oracle@ol7ora12r12][/u01/app/oracle/product/12c/db_1]$ which opatch
/u01/app/oracle/product/12c/db_1/OPatch/opatch

[ORA12R12:oracle@ol7ora12r12][/u01/app/oracle/product/12c/db_1]$ opatch version
OPatch Version: 12.2.0.1.42

OPatch succeeded.


5. PSU 패치 파일 압축 해제

 

--RAC 1번 노드
[root@ol7ora12r12][/root]$ unzip /tmp/patch/p33583921_122010_Linux-x86-64.zip -d /tmp/patch
[root@ol7ora12r12][/root]$ chmod 777 -R /tmp/patch/33583921

 

--RAC 2번 노드
[root@ol7ora12r12][/root]$ unzip /tmp/patch/p33583921_122010_Linux-x86-64.zip -d /tmp/patch
[root@ol7ora12r12][/root]$ chmod 777 -R /tmp/patch/33583921

 

6. mgmtlsnr 및 mgmtdb 가 ON 상태인지 확인

 

[+ASM1:grid@ol7ora12r11][/home/grid]$ srvctl status mgmtlsnr
Listener MGMTLSNR is enabled
Listener MGMTLSNR is running on node(s): ol7ora12r11

 

[+ASM1:grid@ol7ora12r11][/home/grid]$ srvctl status mgmtdb
Database is enabled
Instance -MGMTDB is running on node ol7ora12r11

 

[+ASM1:grid@ol7ora12r11][/home/grid]$ srvctl config mgmtlsnr
Name: MGMTLSNR
Type: Management Listener
Owner: grid
Home: <CRS home>
End points: TCP:1525
Management listener is enabled.
Management listener is individually enabled on nodes:
Management listener is individually disabled on nodes:
[+ASM1:grid@ol7ora12r11][/home/grid]$ srvctl config mgmtdb
Database unique name: _mgmtdb
Database name:
Oracle home: <CRS home>
Oracle user: grid
Spfile: +MGMT1/_MGMTDB/PARAMETERFILE/spfile.269.1211369259
Password file:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Type: Management
PDB name: GIMR_DSCREP_10
PDB service: GIMR_DSCREP_10
Cluster name: ol7ora12r1
Database instance: -MGMTDB

 

[+ASM1:grid@ol7ora12r11][/home/grid]$ crsctl status resource ora.mgmtdb -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.mgmtdb
      1        ONLINE  ONLINE       ol7ora12r11              Open,STABLE
--------------------------------------------------------------------------------

[+ASM1:grid@ol7ora12r11][/home/grid]$ crsctl status resource ora.MGMTLSNR
NAME=ora.MGMTLSNR
TYPE=ora.mgmtlsnr.type
TARGET=ONLINE
STATE=ONLINE on ol7ora12r11

--> 만약 off상태라면 (grid os user)
srvctl enable mgmtlsnr -node ol7ora12r11
srvctl start  mgmtlsnr -node ol7ora12r11
srvctl enable mgmtdb -node ol7ora12r11
srvctl start mgmtdb -node ol7ora12r11

 

7. cha 가 중지되어 있는지 확인

 

[+ASM1:grid@ol7ora12r11][/home/grid]$ crsctl status resource ora.MGMTLSNR
NAME=ora.MGMTLSNR
TYPE=ora.mgmtlsnr.type
TARGET=ONLINE
STATE=ONLINE on ol7ora12r11

 

[+ASM1:grid@ol7ora12r11][/home/grid]$ crsctl status resource ora.chad -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.chad
               ONLINE  ONLINE       ol7ora12r11              STABLE
               ONLINE  ONLINE       ol7ora12r12              STABLE
--------------------------------------------------------------------------------

--> cha 중지

[+ASM1:grid@ol7ora12r11][/home/grid]$ srvctl stop cha
[+ASM1:grid@ol7ora12r11][/home/grid]$ crsctl status resource ora.chad -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.chad
               OFFLINE OFFLINE      ol7ora12r11              STABLE
               OFFLINE OFFLINE      ol7ora12r12              STABLE
--------------------------------------------------------------------------------

 

8. 패치 작업 전 grid 및 oracle 엔진 백업

 

--RAC1번 노드
--GRID_HOME 백업 (root user로 접속)

[root@ol7ora12r11][/root]$ echo $GRID_HOME
/u01/app/12c/grid
[root@ol7ora12r11][/root]$ cd $GRID_HOME
[root@ol7ora12r11][/u01/app/12c/grid]$ cd ..
[root@ol7ora12r11][/u01/app/12c]$ tar cvpzf grid.tar grid

 

--ORACLE_HOME 백업(oracle user로 접속)

[ORA12R11:oracle@ol7ora12r11][/home/oracle]$ echo $ORACLE_HOME
/u01/app/oracle/product/12c/db_1
[ORA12R11:oracle@ol7ora12r11][/home/oracle]$ cd $ORACLE_HOME
[ORA12R11:oracle@ol7ora12r11][/u01/app/oracle/product/12c/db_1]$ cd ..
[ORA12R11:oracle@ol7ora12r11][/u01/app/oracle/product/12c]$ tar cvpzf db_1.tar db_1

 

--RAC2번 노드

--GRID_HOME 백업 (root user로 접속)

[root@ol7ora12r12][/root]$ echo $GRID_HOME
/u01/app/12c/grid
[root@ol7ora12r12][/root]$ cd $GRID_HOME
[root@ol7ora12r12][/u01/app/12c/grid]$ cd ..
[root@ol7ora12r12][/u01/app/12c]$ tar cvpzf grid.tar grid

 

--ORACLE_HOME 백업(oracle user로 접속)

[ORA12R11:oracle@ol7ora12r12][/home/oracle]$ echo $ORACLE_HOME
/u01/app/oracle/product/12c/db_1

[ORA12R11:oracle@ol7ora12r12][/home/oracle]$ cd $ORACLE_HOME
[ORA12R11:oracle@ol7ora12r12][/u01/app/oracle/product/12c/db_1]$ cd ..
[ORA12R11:oracle@ol7ora12r12][/u01/app/oracle/product/12c]$ tar cvpzf db_1.tar db_1

 

9. 패치 작업

 

--RAC1번

 

--grid 패치 충돌 검증 (grid os user)
$GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33587128
$GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33678030
$GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33116894
$GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/26839277
$GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33610989

 

[+ASM1:grid@ol7ora12r11][/home/grid]$ echo $GRID_HOME
/u01/app/12c/grid

[+ASM1:grid@ol7ora12r11][/home/grid]$ $GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33587128
Oracle Interim Patch Installer version 12.2.0.1.42
Copyright (c) 2025, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12c/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/12c/grid/oraInst.loc
OPatch version    : 12.2.0.1.42
OUI version       : 12.2.0.1.4
Log file location : /u01/app/12c/grid/cfgtoollogs/opatch/opatch2025-09-11_22-37-53PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[+ASM1:grid@ol7ora12r11][/home/grid]$ $GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33678030
Oracle Interim Patch Installer version 12.2.0.1.42
Copyright (c) 2025, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12c/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/12c/grid/oraInst.loc
OPatch version    : 12.2.0.1.42
OUI version       : 12.2.0.1.4
Log file location : /u01/app/12c/grid/cfgtoollogs/opatch/opatch2025-09-11_22-38-07PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.


[+ASM1:grid@ol7ora12r11][/home/grid]$ $GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33116894
Oracle Interim Patch Installer version 12.2.0.1.42
Copyright (c) 2025, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12c/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/12c/grid/oraInst.loc
OPatch version    : 12.2.0.1.42
OUI version       : 12.2.0.1.4
Log file location : /u01/app/12c/grid/cfgtoollogs/opatch/opatch2025-09-11_22-38-13PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.


 

[+ASM1:grid@ol7ora12r11][/home/grid]$ $GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/26839277
Oracle Interim Patch Installer version 12.2.0.1.42
Copyright (c) 2025, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12c/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/12c/grid/oraInst.loc
OPatch version    : 12.2.0.1.42
OUI version       : 12.2.0.1.4
Log file location : /u01/app/12c/grid/cfgtoollogs/opatch/opatch2025-09-11_22-38-18PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[+ASM1:grid@ol7ora12r11][/home/grid]$ $GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33610989

Oracle Interim Patch Installer version 12.2.0.1.42
Copyright (c) 2025, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12c/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/12c/grid/oraInst.loc
OPatch version    : 12.2.0.1.42
OUI version       : 12.2.0.1.4
Log file location : /u01/app/12c/grid/cfgtoollogs/opatch/opatch2025-09-11_22-38-23PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

 

--용량 확인 (grid os user)
[+ASM1:grid@ol7ora12r11][/home/grid]$ vi /home/grid/patch_list_grid_home.txt
[+ASM1:grid@ol7ora12r11][/home/grid]$ cat /home/grid/patch_list_grid_home.txt
/tmp/patch/33583921/33587128
/tmp/patch/33583921/33678030
/tmp/patch/33583921/33116894
/tmp/patch/33583921/26839277
/tmp/patch/33583921/33610989

 

[+ASM1:grid@ol7ora12r11][/home/grid]$ $GRID_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /home/grid/patch_list_grid_home.txt
Oracle Interim Patch Installer version 12.2.0.1.42
Copyright (c) 2025, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12c/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/12c/grid/oraInst.loc
OPatch version    : 12.2.0.1.42
OUI version       : 12.2.0.1.4
Log file location : /u01/app/12c/grid/cfgtoollogs/opatch/opatch2025-09-11_22-39-57PM_1.log

Invoking prereq "checksystemspace"

Prereq "checkSystemSpace" passed.

OPatch succeeded.

 

--oracle 패치 충돌 확인 (oracle os user)
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33587128
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33678030

 

[ORA12R11:oracle@ol7ora12r11][/home/oracle]$ echo $ORACLE_HOME
/u01/app/oracle/product/12c/db_1

 

[ORA12R11:oracle@ol7ora12r11][/home/oracle]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33587128
Oracle Interim Patch Installer version 12.2.0.1.42
Copyright (c) 2025, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/12c/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12c/db_1/oraInst.loc
OPatch version    : 12.2.0.1.42
OUI version       : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12c/db_1/cfgtoollogs/opatch/opatch2025-09-11_22-49-52PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.


 

[ORA12R11:oracle@ol7ora12r11][/home/oracle]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33678030
Oracle Interim Patch Installer version 12.2.0.1.42
Copyright (c) 2025, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/12c/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12c/db_1/oraInst.loc
OPatch version    : 12.2.0.1.42
OUI version       : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12c/db_1/cfgtoollogs/opatch/opatch2025-09-11_22-50-01PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

 

[ORA12R11:oracle@ol7ora12r11][/home/oracle]$ vi patch_list_oracle_home.txt
[ORA12R11:oracle@ol7ora12r11][/home/oracle]$ cat patch_list_oracle_home.txt
/tmp/patch/33583921/33587128
/tmp/patch/33583921/33678030

 

[ORA12R11:oracle@ol7ora12r11][/home/oracle]$ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /home/oracle/patch_list_oracle_home.txt
Oracle Interim Patch Installer version 12.2.0.1.42
Copyright (c) 2025, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/12c/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12c/db_1/oraInst.loc
OPatch version    : 12.2.0.1.42
OUI version       : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12c/db_1/cfgtoollogs/opatch/opatch2025-09-11_22-51-01PM_1.log

Invoking prereq "checksystemspace"

Prereq "checkSystemSpace" passed.

OPatch succeeded.

 

--rootcrs.sh -prepatch 수행 (root os user)

[root@ol7ora12r11][/root]$ echo $GRID_HOME
/u01/app/12c/grid
[root@ol7ora12r11][/root]$ $GRID_HOME/crs/install/rootcrs.sh -prepatch
Using configuration parameter file: /u01/app/12c/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/oracle/crsdata/ol7ora12r11/crsconfig/crspatch_ol7ora12r11_2025-09-11_10-41-11PM.log
Oracle Clusterware active version on the cluster is [12.2.0.1.0]. The cluster upgrade state is [NORMAL]. The cluster active patch level is [0].
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'ol7ora12r11'
CRS-2673: Attempting to stop 'ora.crsd' on 'ol7ora12r11'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on server 'ol7ora12r11'
CRS-2673: Attempting to stop 'ora.mgmtdb' on 'ol7ora12r11'
CRS-2673: Attempting to stop 'ora.ora12r1.db' on 'ol7ora12r11'
CRS-2677: Stop of 'ora.mgmtdb' on 'ol7ora12r11' succeeded
CRS-2673: Attempting to stop 'ora.MGMTLSNR' on 'ol7ora12r11'
CRS-2677: Stop of 'ora.ora12r1.db' on 'ol7ora12r11' succeeded
CRS-2673: Attempting to stop 'ora.CRS.dg' on 'ol7ora12r11'
CRS-2673: Attempting to stop 'ora.DATA1.dg' on 'ol7ora12r11'
CRS-2673: Attempting to stop 'ora.FRA1.dg' on 'ol7ora12r11'
CRS-2673: Attempting to stop 'ora.MGMT1.dg' on 'ol7ora12r11'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'ol7ora12r11'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'ol7ora12r11'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'ol7ora12r11'
CRS-2677: Stop of 'ora.DATA1.dg' on 'ol7ora12r11' succeeded
CRS-2677: Stop of 'ora.MGMT1.dg' on 'ol7ora12r11' succeeded
CRS-2677: Stop of 'ora.FRA1.dg' on 'ol7ora12r11' succeeded
CRS-2677: Stop of 'ora.CRS.dg' on 'ol7ora12r11' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'ol7ora12r11'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'ol7ora12r11' succeeded
CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'ol7ora12r11' succeeded
CRS-2673: Attempting to stop 'ora.scan2.vip' on 'ol7ora12r11'
CRS-2677: Stop of 'ora.LISTENER_SCAN3.lsnr' on 'ol7ora12r11' succeeded
CRS-2673: Attempting to stop 'ora.scan3.vip' on 'ol7ora12r11'
CRS-2677: Stop of 'ora.asm' on 'ol7ora12r11' succeeded
CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'ol7ora12r11'
CRS-2677: Stop of 'ora.MGMTLSNR' on 'ol7ora12r11' succeeded
CRS-2673: Attempting to stop 'ora.ol7ora12r11.vip' on 'ol7ora12r11'
CRS-2677: Stop of 'ora.scan2.vip' on 'ol7ora12r11' succeeded
CRS-2677: Stop of 'ora.scan3.vip' on 'ol7ora12r11' succeeded
CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'ol7ora12r11' succeeded
CRS-2677: Stop of 'ora.ol7ora12r11.vip' on 'ol7ora12r11' succeeded
CRS-2672: Attempting to start 'ora.MGMTLSNR' on 'ol7ora12r12'
CRS-2672: Attempting to start 'ora.scan2.vip' on 'ol7ora12r12'
CRS-2672: Attempting to start 'ora.scan3.vip' on 'ol7ora12r12'
CRS-2672: Attempting to start 'ora.ol7ora12r11.vip' on 'ol7ora12r12'
CRS-2676: Start of 'ora.scan2.vip' on 'ol7ora12r12' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN2.lsnr' on 'ol7ora12r12'
CRS-2676: Start of 'ora.scan3.vip' on 'ol7ora12r12' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN3.lsnr' on 'ol7ora12r12'
CRS-2676: Start of 'ora.ol7ora12r11.vip' on 'ol7ora12r12' succeeded
CRS-2676: Start of 'ora.MGMTLSNR' on 'ol7ora12r12' succeeded
CRS-2672: Attempting to start 'ora.mgmtdb' on 'ol7ora12r12'
CRS-2676: Start of 'ora.LISTENER_SCAN2.lsnr' on 'ol7ora12r12' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN3.lsnr' on 'ol7ora12r12' succeeded
CRS-2676: Start of 'ora.mgmtdb' on 'ol7ora12r12' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'ol7ora12r11'
CRS-2677: Stop of 'ora.ons' on 'ol7ora12r11' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'ol7ora12r11'
CRS-2677: Stop of 'ora.net1.network' on 'ol7ora12r11' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'ol7ora12r11' has completed
CRS-2677: Stop of 'ora.crsd' on 'ol7ora12r11' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'ol7ora12r11'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'ol7ora12r11'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'ol7ora12r11'
CRS-2677: Stop of 'ora.gpnpd' on 'ol7ora12r11' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'ol7ora12r11' succeeded
CRS-2677: Stop of 'ora.asm' on 'ol7ora12r11' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'ol7ora12r11'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'ol7ora12r11' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'ol7ora12r11'
CRS-2673: Attempting to stop 'ora.evmd' on 'ol7ora12r11'
CRS-2677: Stop of 'ora.ctssd' on 'ol7ora12r11' succeeded
CRS-2677: Stop of 'ora.evmd' on 'ol7ora12r11' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'ol7ora12r11'
CRS-2677: Stop of 'ora.cssd' on 'ol7ora12r11' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'ol7ora12r11'
CRS-2677: Stop of 'ora.gipcd' on 'ol7ora12r11' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ol7ora12r11' has completed
CRS-4133: Oracle High Availability Services has been stopped.
2025/09/11 22:42:12 CLSRSC-4012: Shutting down Oracle Trace File Analyzer (TFA) Collector.
2025/09/11 22:42:20 CLSRSC-4013: Successfully shut down Oracle Trace File Analyzer (TFA) Collector.
2025/09/11 22:42:20 CLSRSC-347: Successfully unlock /u01/app/12c/grid


--grid 패치 적용 (grid os user)

[+ASM1:grid@ol7ora12r11][/home/grid]$ echo $GRID_HOME
/u01/app/12c/grid

$GRID_HOME/OPatch/opatch apply -oh $GRID_HOME -local /tmp/patch/33583921/33587128
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 ‘/u01/app/12c/grid/bin/extjobO’: Operation not permitted
make: [iextjob] Error 1 (ignored)


Patch 33587128 successfully applied.
OPatch Session completed with warnings.
Log file location: /u01/app/12c/grid/cfgtoollogs/opatch/opatch2025-09-11_22-52-39PM_1.log

OPatch completed with warnings.
--> 위와 같은 에러가 발생함 (버그 이므로 무시함)

--(Doc ID 2265726.1 참고)
Issue 18
You may see the following message in apply or rollback logs or both logs:

Stderr output:
 chmod: changing permissions of
`/u03/app/oracle/product/12.1.0/grid/bin/extjobO: Operation not permitted
 make: [iextjob] Error 1 (ignored)
This warning can be ignored safely.

 

$GRID_HOME/OPatch/opatch apply -oh $GRID_HOME -local /tmp/patch/33583921/33678030
--> 아래와 같은 에러 발생한다면-------------------------------------------------------------------------------------------------------------------------------------------

Patching component oracle.has.common.cvu, 12.2.0.1.0...
Make failed to invoke "/usr/bin/make -f ins_srvm.mk install_srvm ORACLE_HOME=/u01/app/12c/grid OPATCH_SESSION=apply"....'/bin/sh: /usr/bin/gcc: No such file or directory
make: *** [/u01/app/12c/grid/rdbms/lib/config.o] Error 127
'
The following make actions have failed :
Re-link fails on target "install_srvm".
Do you want to proceed? [y|n]

Linux: OPatch Issue:Re-link fails with: gcc: command not found (Doc ID 1587580.1)
[root@ol7ora12r11][/root]$ yum install -y gcc*
[root@ol7ora12r11][/root]$ ls -lrt /usr/bin/gcc
--> 위의 조치 후 다시 시도------------------------------------------------------------------------------------------------------------------------------------------------

 

$GRID_HOME/OPatch/opatch apply -oh $GRID_HOME -local /tmp/patch/33583921/33116894
$GRID_HOME/OPatch/opatch apply -oh $GRID_HOME -local /tmp/patch/33583921/26839277
$GRID_HOME/OPatch/opatch apply -oh $GRID_HOME -local /tmp/patch/33583921/33610989


--oracle 패치 작업 (oracle os user)

[ORA12R11:oracle@ol7ora12r11][/home/oracle]$ echo $ORACLE_HOME
/u01/app/oracle/product/12c/db_1

/tmp/patch/33583921/33587128/custom/scripts/init -apply
/tmp/patch/33583921/33587128/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /tmp/patch/33583921/33587128
--아래의 에러가 발생한다면-----------------------------------------------------------------------------------

--Doc ID 2265726.1 참고
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 ‘/u01/app/12c/grid/bin/extjobO’: Operation not permitted
make: [iextjob] Error 1 (ignored)

Issue 18   
You may see the following message in apply or rollback logs or both logs:

Stderr output:
 chmod: changing permissions of
`/u03/app/oracle/product/12.1.0/grid/bin/extjobO: Operation not permitted
 make: [iextjob] Error 1 (ignored)

This warning can be ignored safely.
--위의 에러는 버그이므로 무시해도됨-----------------------------------------------------------------------------

 

/tmp/patch/33583921/33678030/custom/scripts/prepatch.sh
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /tmp/patch/33583921/33678030
/tmp/patch/33583921/33678030/custom/scripts/postpatch.sh

 

[root@ol7ora12r11][/root]$ chown root:root $DB_HOME/bin/extjob
[root@ol7ora12r11][/root]$ chmod 4750 $DB_HOME/bin/extjob
[root@ol7ora12r11][/root]$ $GRID_HOME/rdbms/install/rootadd_rdbms.sh


[+ASM1:grid@ol7ora12r11][/home/grid]$ mv $GRID_HOME/sqlplus/admin/glogin.sql $GRID_HOME/sqlplus/admin/glogin.sql.bak
[root@ol7ora12r11][/root]$ $GRID_HOME/crs/install/rootcrs.sh -postpatch
[+ASM1:grid@ol7ora12r11][/home/grid]$ mv $GRID_HOME/sqlplus/admin/glogin.sql.bak $GRID_HOME/sqlplus/admin/glogin.sql

[root@ol7ora12r11][/root]$ mkdir -p /u01/app/oracle/cfgtoollogs/sqlpatch
[root@ol7ora12r11][/root]$ chmod 775 /u01/app/oracle/cfgtoollogs/sqlpatch

 

--RAC2번

--grid 패치 충돌 검증 (grid os user)
$GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33587128
$GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33678030
$GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33116894
$GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/26839277
$GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33610989

 

[+ASM2:grid@ol7ora12r12][/home/grid]$ echo $GRID_HOME
/u01/app/12c/grid

[+ASM2:grid@ol7ora12r12][/home/grid]$ $GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33587128
Oracle Interim Patch Installer version 12.2.0.1.42
Copyright (c) 2025, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12c/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/12c/grid/oraInst.loc
OPatch version    : 12.2.0.1.42
OUI version       : 12.2.0.1.4
Log file location : /u01/app/12c/grid/cfgtoollogs/opatch/opatch2025-09-11_23-48-03PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

[+ASM2:grid@ol7ora12r12][/home/grid]$ $GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33678030
Oracle Interim Patch Installer version 12.2.0.1.42
Copyright (c) 2025, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12c/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/12c/grid/oraInst.loc
OPatch version    : 12.2.0.1.42
OUI version       : 12.2.0.1.4
Log file location : /u01/app/12c/grid/cfgtoollogs/opatch/opatch2025-09-11_23-48-09PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

[+ASM2:grid@ol7ora12r12][/home/grid]$ $GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33116894
Oracle Interim Patch Installer version 12.2.0.1.42
Copyright (c) 2025, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12c/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/12c/grid/oraInst.loc
OPatch version    : 12.2.0.1.42
OUI version       : 12.2.0.1.4
Log file location : /u01/app/12c/grid/cfgtoollogs/opatch/opatch2025-09-11_23-48-15PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

[+ASM2:grid@ol7ora12r12][/home/grid]$ $GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/26839277
Oracle Interim Patch Installer version 12.2.0.1.42
Copyright (c) 2025, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12c/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/12c/grid/oraInst.loc
OPatch version    : 12.2.0.1.42
OUI version       : 12.2.0.1.4
Log file location : /u01/app/12c/grid/cfgtoollogs/opatch/opatch2025-09-11_23-48-21PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

[+ASM2:grid@ol7ora12r12][/home/grid]$ $GRID_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33610989
Oracle Interim Patch Installer version 12.2.0.1.42
Copyright (c) 2025, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12c/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/12c/grid/oraInst.loc
OPatch version    : 12.2.0.1.42
OUI version       : 12.2.0.1.4
Log file location : /u01/app/12c/grid/cfgtoollogs/opatch/opatch2025-09-11_23-48-32PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.


--용량 확인 (grid os user)
[+ASM2:grid@ol7ora12r12][/home/grid]$ vi /home/grid/patch_list_grid_home.txt
[+ASM2:grid@ol7ora12r12][/home/grid]$ cat /home/grid/patch_list_grid_home.txt
/tmp/patch/33583921/33587128
/tmp/patch/33583921/33678030
/tmp/patch/33583921/33116894
/tmp/patch/33583921/26839277
/tmp/patch/33583921/33610989


[+ASM2:grid@ol7ora12r12][/home/grid]$ $GRID_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /home/grid/patch_list_grid_home.txt
Oracle Interim Patch Installer version 12.2.0.1.42
Copyright (c) 2025, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/12c/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/12c/grid/oraInst.loc
OPatch version    : 12.2.0.1.42
OUI version       : 12.2.0.1.4
Log file location : /u01/app/12c/grid/cfgtoollogs/opatch/opatch2025-09-11_23-49-25PM_1.log

Invoking prereq "checksystemspace"

Prereq "checkSystemSpace" passed.

OPatch succeeded.


--oracle 패치 충돌 확인 (oracle os user)
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33587128
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33678030

[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ echo $ORACLE_HOME
/u01/app/oracle/product/12c/db_1

[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33587128
Oracle Interim Patch Installer version 12.2.0.1.42
Copyright (c) 2025, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/12c/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12c/db_1/oraInst.loc
OPatch version    : 12.2.0.1.42
OUI version       : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12c/db_1/cfgtoollogs/opatch/opatch2025-09-11_23-49-40PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

 

[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/patch/33583921/33678030
Oracle Interim Patch Installer version 12.2.0.1.42
Copyright (c) 2025, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/12c/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12c/db_1/oraInst.loc
OPatch version    : 12.2.0.1.42
OUI version       : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12c/db_1/cfgtoollogs/opatch/opatch2025-09-11_23-49-45PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

 

--용량 확인 (oracle os user)
[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ vi patch_list_oracle_home.txt
[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ cat patch_list_oracle_home.txt
/tmp/patch/33583921/33587128
/tmp/patch/33583921/33678030

 

[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /home/oracle/patch_list_oracle_home.txt
Oracle Interim Patch Installer version 12.2.0.1.42
Copyright (c) 2025, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/12c/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12c/db_1/oraInst.loc
OPatch version    : 12.2.0.1.42
OUI version       : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12c/db_1/cfgtoollogs/opatch/opatch2025-09-11_23-50-25PM_1.log

Invoking prereq "checksystemspace"

Prereq "checkSystemSpace" passed.

 

--rootcrs.sh -prepatch 수행 (root os user)

[root@ol7ora12r12][/root]$ echo $GRID_HOME
/u01/app/12c/grid
[root@ol7ora12r12][/root]$ $GRID_HOME/crs/install/rootcrs.sh -prepatch
Using configuration parameter file: /u01/app/12c/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/oracle/crsdata/ol7ora12r12/crsconfig/crspatch_ol7ora12r12_2025-09-11_11-50-45PM.log
Oracle Clusterware active version on the cluster is [12.2.0.1.0]. The cluster upgrade state is [ROLLING PATCH]. The cluster active patch level is [0].
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'ol7ora12r12'
CRS-2673: Attempting to stop 'ora.crsd' on 'ol7ora12r12'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on server 'ol7ora12r12'
CRS-2673: Attempting to stop 'ora.ora12r1.db' on 'ol7ora12r12'
CRS-2677: Stop of 'ora.ora12r1.db' on 'ol7ora12r12' succeeded
CRS-2673: Attempting to stop 'ora.CRS.dg' on 'ol7ora12r12'
CRS-2673: Attempting to stop 'ora.DATA1.dg' on 'ol7ora12r12'
CRS-2673: Attempting to stop 'ora.FRA1.dg' on 'ol7ora12r12'
CRS-2673: Attempting to stop 'ora.MGMT1.dg' on 'ol7ora12r12'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'ol7ora12r12'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'ol7ora12r12'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'ol7ora12r12'
CRS-2677: Stop of 'ora.CRS.dg' on 'ol7ora12r12' succeeded
CRS-2677: Stop of 'ora.DATA1.dg' on 'ol7ora12r12' succeeded
CRS-2677: Stop of 'ora.MGMT1.dg' on 'ol7ora12r12' succeeded
CRS-2677: Stop of 'ora.FRA1.dg' on 'ol7ora12r12' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'ol7ora12r12'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'ol7ora12r12' succeeded
CRS-2673: Attempting to stop 'ora.ol7ora12r12.vip' on 'ol7ora12r12'
CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'ol7ora12r12' succeeded
CRS-2673: Attempting to stop 'ora.scan2.vip' on 'ol7ora12r12'
CRS-2677: Stop of 'ora.LISTENER_SCAN3.lsnr' on 'ol7ora12r12' succeeded
CRS-2673: Attempting to stop 'ora.scan3.vip' on 'ol7ora12r12'
CRS-2677: Stop of 'ora.asm' on 'ol7ora12r12' succeeded
CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'ol7ora12r12'
CRS-2677: Stop of 'ora.ol7ora12r12.vip' on 'ol7ora12r12' succeeded
CRS-2677: Stop of 'ora.scan2.vip' on 'ol7ora12r12' succeeded
CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'ol7ora12r12' succeeded
CRS-2677: Stop of 'ora.scan3.vip' on 'ol7ora12r12' succeeded
CRS-2672: Attempting to start 'ora.scan2.vip' on 'ol7ora12r11'
CRS-2672: Attempting to start 'ora.scan3.vip' on 'ol7ora12r11'
CRS-2672: Attempting to start 'ora.ol7ora12r12.vip' on 'ol7ora12r11'
CRS-2676: Start of 'ora.scan2.vip' on 'ol7ora12r11' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN2.lsnr' on 'ol7ora12r11'
CRS-2676: Start of 'ora.ol7ora12r12.vip' on 'ol7ora12r11' succeeded
CRS-2676: Start of 'ora.scan3.vip' on 'ol7ora12r11' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN3.lsnr' on 'ol7ora12r11'
CRS-2676: Start of 'ora.LISTENER_SCAN2.lsnr' on 'ol7ora12r11' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN3.lsnr' on 'ol7ora12r11' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'ol7ora12r12'
CRS-2677: Stop of 'ora.ons' on 'ol7ora12r12' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'ol7ora12r12'
CRS-2677: Stop of 'ora.net1.network' on 'ol7ora12r12' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'ol7ora12r12' has completed
CRS-2677: Stop of 'ora.crsd' on 'ol7ora12r12' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'ol7ora12r12'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'ol7ora12r12'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'ol7ora12r12'
CRS-2677: Stop of 'ora.gpnpd' on 'ol7ora12r12' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'ol7ora12r12' succeeded
CRS-2677: Stop of 'ora.asm' on 'ol7ora12r12' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'ol7ora12r12'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'ol7ora12r12' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'ol7ora12r12'
CRS-2673: Attempting to stop 'ora.evmd' on 'ol7ora12r12'
CRS-2677: Stop of 'ora.ctssd' on 'ol7ora12r12' succeeded
CRS-2677: Stop of 'ora.evmd' on 'ol7ora12r12' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'ol7ora12r12'
CRS-2677: Stop of 'ora.cssd' on 'ol7ora12r12' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'ol7ora12r12'
CRS-2677: Stop of 'ora.gipcd' on 'ol7ora12r12' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ol7ora12r12' has completed
CRS-4133: Oracle High Availability Services has been stopped.
2025/09/11 23:51:31 CLSRSC-4012: Shutting down Oracle Trace File Analyzer (TFA) Collector.
2025/09/11 23:51:39 CLSRSC-4013: Successfully shut down Oracle Trace File Analyzer (TFA) Collector.
2025/09/11 23:51:39 CLSRSC-347: Successfully unlock /u01/app/12c/grid

 

--grid 패치 적용 (grid os user)

[+ASM1:grid@ol7ora12rf1][/home/grid]$ echo $GRID_HOME
/u01/app/12c/grid

$GRID_HOME/OPatch/opatch apply -oh $GRID_HOME -local /tmp/patch/33583921/33587128
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 ‘/u01/app/12c/grid/bin/extjobO’: Operation not permitted
make: [iextjob] Error 1 (ignored)


Patch 33587128 successfully applied.
OPatch Session completed with warnings.
Log file location: /u01/app/12c/grid/cfgtoollogs/opatch/opatch2025-09-11_22-52-39PM_1.log

OPatch completed with warnings.
--> 위와 같은 에러가 발생함 (버그 이므로 무시함)

--(Doc ID 2265726.1 참고)
Issue 18   
You may see the following message in apply or rollback logs or both logs:

Stderr output:
 chmod: changing permissions of
`/u03/app/oracle/product/12.1.0/grid/bin/extjobO: Operation not permitted
 make: [iextjob] Error 1 (ignored)
This warning can be ignored safely.

$GRID_HOME/OPatch/opatch apply -oh $GRID_HOME -local /tmp/patch/33583921/33678030
--> 아래와 같은 에러 발생한다면-------------------------------------------------------------------------------------------------------------------------------------------

Patching component oracle.has.common.cvu, 12.2.0.1.0...
Make failed to invoke "/usr/bin/make -f ins_srvm.mk install_srvm ORACLE_HOME=/u01/app/12c/grid OPATCH_SESSION=apply"....'/bin/sh: /usr/bin/gcc: No such file or directory
make: *** [/u01/app/12c/grid/rdbms/lib/config.o] Error 127
'
The following make actions have failed :
Re-link fails on target "install_srvm".
Do you want to proceed? [y|n]

Linux: OPatch Issue:Re-link fails with: gcc: command not found (Doc ID 1587580.1)
[root@ol7ora12r11][/root]$ yum install -y gcc*
[root@ol7ora12r11][/root]$ ls -lrt /usr/bin/gcc
--> 위의 조치 후 다시 시도------------------------------------------------------------------------------------------------------------------------------------------------

$GRID_HOME/OPatch/opatch apply -oh $GRID_HOME -local /tmp/patch/33583921/33116894
$GRID_HOME/OPatch/opatch apply -oh $GRID_HOME -local /tmp/patch/33583921/26839277
$GRID_HOME/OPatch/opatch apply -oh $GRID_HOME -local /tmp/patch/33583921/33610989


--oracle 패치 작업 (oracle os user)

[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ echo $ORACLE_HOME
/u01/app/oracle/product/12c/db_1


/tmp/patch/33583921/33587128/custom/scripts/init -apply
/tmp/patch/33583921/33587128/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /tmp/patch/33583921/33587128

--아래의 에러가 발생한다면-----------------------------------------------------------------------------------
--Doc ID 2265726.1 참고
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 ‘/u01/app/12c/grid/bin/extjobO’: Operation not permitted
make: [iextjob] Error 1 (ignored)

Issue 18   
You may see the following message in apply or rollback logs or both logs:

Stderr output:
 chmod: changing permissions of
`/u03/app/oracle/product/12.1.0/grid/bin/extjobO: Operation not permitted
 make: [iextjob] Error 1 (ignored)

This warning can be ignored safely.
--위의 에러는 버그이므로 무시해도됨-----------------------------------------------------------------------------

/tmp/patch/33583921/33678030/custom/scripts/prepatch.sh
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /tmp/patch/33583921/33678030
/tmp/patch/33583921/33678030/custom/scripts/postpatch.sh

 

[root@ol7ora12r12][/root]$ echo $DB_HOME
/u01/app/oracle/product/12c/db_1

[root@ol7ora12r12][/root]$ chown root:root $DB_HOME/bin/extjob
[root@ol7ora12r12][/root]$ chmod 4750 $DB_HOME/bin/extjob
[root@ol7ora12r12][/root]$ $GRID_HOME/rdbms/install/rootadd_rdbms.sh

 

[+ASM2:grid@ol7ora12r12][/home/grid]$ mv $GRID_HOME/sqlplus/admin/glogin.sql $GRID_HOME/sqlplus/admin/glogin.sql.bak
[root@ol7ora12r12][/root]$ $GRID_HOME/crs/install/rootcrs.sh -postpatch

--여기서 normal이 됨
Oracle Clusterware active version on the cluster is [12.2.0.1.0]. The cluster upgrade state is [NORMAL]. The cluster active patch level is [3975995681].

 

[+ASM2:grid@ol7ora12r12][/home/grid]$ mv $GRID_HOME/sqlplus/admin/glogin.sql.bak $GRID_HOME/sqlplus/admin/glogin.sql

[root@ol7ora12r12][/root]$ mkdir -p /u01/app/oracle/cfgtoollogs/sqlpatch
[root@ol7ora12r12][/root]$ chmod 775 /u01/app/oracle/cfgtoollogs/sqlpatch

 

10. -MGMTDB 패치 적용 확인

 

[+ASM2:grid@ol7ora12r12][/home/grid]$ export ORACLE_SID=-MGMTDB
[-MGMTDB:grid@ol7ora12r12][/home/grid]$ alias ss

alias ss='rlwrap sqlplus "/as sysdba"'

[-MGMTDB:grid@ol7ora12r12][/home/grid]$ ss

SQL*Plus: Release 12.2.0.1.0 Production on Fri Sep 12 14:05:48 2025

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

[ol7ora12r12] SYS@-MGMTDB>
SET LINESIZE 200
SET PAGESIZE 100
SET WRAP OFF
COL PATCH_ID     FORMAT 99999999
COL PATCH_UID    FORMAT 99999999
COL VERSION      FORMAT A12
COL ACTION       FORMAT A10
COL STATUS       FORMAT A10
COL INSTALL_ID   FORMAT 999999
COL ACTION_TIME  FORMAT A19
COL DESCRIPTION  FORMAT A60 WORD_WRAPPED

SELECT PATCH_ID
     , PATCH_UID
     , VERSION
     , ACTION
     , STATUS
     , INSTALL_ID
     , TO_CHAR(ACTION_TIME,'YYYY-MM-DD HH24:MI:SS') AS ACTION_TIME
     , DESCRIPTION
  FROM DBA_REGISTRY_SQLPATCH
 ORDER BY ACTION_TIME;

 PATCH_ID PATCH_UID VERSION      ACTION     STATUS     INSTALL_ID ACTION_TIME         DESCRIPTION
--------- --------- ------------ ---------- ---------- ---------- ------------------- ------------------------------------------------------------
 33587128  24566093 12.2.0.1     APPLY      SUCCESS             1 2025-09-11 23:30:16 DATABASE JAN 2022 RELEASE UPDATE 12.2.0.1.220118

1 row selected.

Elapsed: 00:00:00.01

 

11. datapatch 작업

 

--오직 한 노드에서만 작업 (여기서는 RAC 2번 노드에서 작업함)

[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ mv $ORACLE_HOME/sqlplus/admin/glogin.sql $ORACLE_HOME/sqlplus/admin/glogin.sql.bak
[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ alias ss
alias ss='rlwrap sqlplus "/as sysdba"'

[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ ss

SQL*Plus: Release 12.2.0.1.0 Production on Fri Sep 12 00:13:28 2025

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql

TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN              2025-09-12 00:13:35

DOC>   The following PL/SQL block invokes UTL_RECOMP to recompile invalid
DOC>   objects in the database. Recompilation time is proportional to the
DOC>   number of invalid objects in the database, so this command may take
DOC>   a long time to execute on a database with a large number of invalid
DOC>   objects.
DOC>
DOC>   Use the following queries to track recompilation progress:
DOC>
DOC>   1. Query returning the number of invalid objects remaining. This
DOC>      number should decrease with time.
DOC>         SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);
DOC>
DOC>   2. Query returning the number of objects compiled so far. This number
DOC>      should increase with time.
DOC>         SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
DOC>
DOC>   This script automatically chooses serial or parallel recompilation
DOC>   based on the number of CPUs available (parameter cpu_count) multiplied
DOC>   by the number of threads per CPU (parameter parallel_threads_per_cpu).
DOC>   On RAC, this number is added across all RAC nodes.
DOC>
DOC>   UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel
DOC>   recompilation. Jobs are created without instance affinity so that they
DOC>   can migrate across RAC nodes. Use the following queries to verify
DOC>   whether UTL_RECOMP jobs are being created and run correctly:
DOC>
DOC>   1. Query showing jobs created by UTL_RECOMP
DOC>         SELECT job_name FROM dba_scheduler_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>
DOC>   2. Query showing UTL_RECOMP jobs that are running
DOC>         SELECT job_name FROM dba_scheduler_running_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>#

PL/SQL procedure successfully completed.


TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_END              2025-09-12 00:13:38

DOC> The following query reports the number of invalid objects.
DOC>
DOC> If the number is higher than expected, please examine the error
DOC> messages reported with each object (using SHOW ERRORS) to see if they
DOC> point to system misconfiguration or resource constraints that must be
DOC> fixed before attempting to recompile these objects.
DOC>#

OBJECTS WITH ERRORS
-------------------
                  0

DOC> The following query reports the number of exceptions caught during
DOC> recompilation. If this number is non-zero, please query the error
DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC> are due to misconfiguration or resource constraints that must be
DOC> fixed before objects can compile successfully.
DOC> Note: Typical compilation errors (due to coding errors) are not
DOC>       logged into this table: they go into DBA_ERRORS instead.
DOC>#

ERRORS DURING RECOMPILATION
---------------------------
                          0


Function created.


PL/SQL procedure successfully completed.


Function dropped.


PL/SQL procedure successfully completed.

SQL>

--> 실패 시 아래의 조치를 함----------------------
grant execute on DBMS_RANDOM to PUBLIC;
grant execute on UTL_FILE to PUBLIC;
grant execute on UTL_HTTP to PUBLIC;
grant execute on DBMS_SQL to PUBLIC;
grant execute on UTL_TCP to PUBLIC;
grant execute on DBMS_LOB to PUBLIC;

--다시 시도
@?/rdbms/admin/utlrp.sql
--------------------------------------------------

[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ cd $ORACLE_HOME/OPatch
[ORA12R12:oracle@ol7ora12r12][/u01/app/oracle/product/12c/db_1/OPatch]$ ./datapatch
SQL Patching tool version 12.2.0.1.0 Production on Fri Sep 12 00:16:11 2025
Copyright (c) 2012, 2021, Oracle.  All rights reserved.

Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_8437_2025_09_12_00_16_11/sqlpatch_invocation.log

Connecting to database...OK
Bootstrapping registry and package to current versions...done
Determining current state...done

Current state of SQL patches:
Bundle series DBRU:
  ID 220118 in the binary registry and not installed in the SQL registry

Adding patches to installation queue and performing prereq checks...
Installation queue:
  Nothing to roll back
  The following patches will be applied:
    33587128 (DATABASE JAN 2022 RELEASE UPDATE 12.2.0.1.220118)

Installing patches...
Patch installation complete.  Total patches installed: 1

Validating logfiles...
Patch 33587128 apply: SUCCESS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/33587128/24566093/33587128_apply_ORA12R1_2025Sep12_00_16_33.log (no errors)
SQL Patching tool complete on Fri Sep 12 00:18:56 2025

[ORA12R12:oracle@ol7ora12r12][/u01/app/oracle/product/12c/db_1/OPatch]$ mv $ORACLE_HOME/sqlplus/admin/glogin.sql.bak $ORACLE_HOME/sqlplus/admin/glogin.sql

[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ alias ss
alias ss='rlwrap sqlplus "/as sysdba"'
[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ ss

SQL*Plus: Release 12.2.0.1.0 Production on Fri Sep 12 00:21:36 2025

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

[ol7ora12r12] SYS@ORA12R12> @$ORACLE_HOME/rdbms/admin/utlrp.sql


12. 패치 후 확인

 

--RAC 1번
[+ASM1:grid@ol7ora12r11][/home/grid]$ opatch lspatches
33610989;TOMCAT RELEASE UPDATE 12.2.0.1.0(ID:RELEASE) (33610989)
26839277;DBWLM RELEASE UPDATE 12.2.0.1.0(ID:170913) (26839277)
33116894;ACFS JUL 2021 RELEASE UPDATE 12.2.0.1.210720 (33116894)
33678030;OCW JAN 2022 RELEASE UPDATE 12.2.0.1.220118 (33678030)
33587128;Database Jan 2022 Release Update : 12.2.0.1.220118 (33587128)

 

--RAC 2번
[+ASM2:grid@ol7ora12r12][/home/grid]$ opatch lspatches
33610989;TOMCAT RELEASE UPDATE 12.2.0.1.0(ID:RELEASE) (33610989)
26839277;DBWLM RELEASE UPDATE 12.2.0.1.0(ID:170913) (26839277)
33116894;ACFS JUL 2021 RELEASE UPDATE 12.2.0.1.210720 (33116894)
33678030;OCW JAN 2022 RELEASE UPDATE 12.2.0.1.220118 (33678030)
33587128;Database Jan 2022 Release Update : 12.2.0.1.220118 (33587128)

OPatch succeeded.

 

--RAC 1번
[ORA12R11:oracle@ol7ora12r11][/home/oracle]$ opatch lspatches
33678030;OCW JAN 2022 RELEASE UPDATE 12.2.0.1.220118 (33678030)
33587128;Database Jan 2022 Release Update : 12.2.0.1.220118 (33587128)

OPatch succeeded.

 

--RAC 2번
[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ opatch lspatches
33678030;OCW JAN 2022 RELEASE UPDATE 12.2.0.1.220118 (33678030)
33587128;Database Jan 2022 Release Update : 12.2.0.1.220118 (33587128)

OPatch succeeded.

 

[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ crsctl query crs releasepatch
Oracle Clusterware release patch level is [3975995681] and the complete list of patches [26839277 33116894 33587128 33610989 33678030 ] have been applied on the local node.
[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ crsctl query crs softwarepatch
Oracle Clusterware patch level on node ol7ora12r12 is [3975995681].
[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ crsctl query crs releasepatch
Oracle Clusterware release patch level is [3975995681] and the complete list of patches [26839277 33116894 33587128 33610989 33678030 ] have been applied on the local node.
[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ crsctl query crs softwarepatch
Oracle Clusterware patch level on node ol7ora12r12 is [3975995681].


[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ alias ss
alias ss='rlwrap sqlplus "/as sysdba"'
[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ ss

SQL*Plus: Release 12.2.0.1.0 Production on Fri Sep 12 00:22:39 2025

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

[ol7ora12r12] SYS@ORA12R12>

SET LINESIZE 200
SET PAGESIZE 100
SET WRAP OFF
COL PATCH_ID     FORMAT 99999999
COL PATCH_UID    FORMAT 99999999
COL VERSION      FORMAT A12
COL ACTION       FORMAT A10
COL STATUS       FORMAT A10
COL INSTALL_ID   FORMAT 999999
COL ACTION_TIME  FORMAT A19
COL DESCRIPTION  FORMAT A60 WORD_WRAPPED

SELECT PATCH_ID
     , PATCH_UID
     , VERSION
     , ACTION
     , STATUS
     , INSTALL_ID
     , TO_CHAR(ACTION_TIME,'YYYY-MM-DD HH24:MI:SS') AS ACTION_TIME
     , DESCRIPTION
  FROM DBA_REGISTRY_SQLPATCH
 ORDER BY ACTION_TIME;

 PATCH_ID PATCH_UID VERSION      ACTION     STATUS     INSTALL_ID ACTION_TIME         DESCRIPTION
--------- --------- ------------ ---------- ---------- ---------- ------------------- ------------------------------------------------------------
 33587128  24566093 12.2.0.1     APPLY      SUCCESS             1 2025-09-12 00:18:56 DATABASE JAN 2022 RELEASE UPDATE 12.2.0.1.220118

 

--> cha 다시 시작
[+ASM1:grid@ol7ora12r11][/home/grid]$ srvctl start cha
[+ASM1:grid@ol7ora12r11][/home/grid]$ crsctl status resource ora.chad -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.chad
               ONLINE  ONLINE       ol7ora12r11              STABLE
               ONLINE  ONLINE       ol7ora12r12              STABLE
--------------------------------------------------------------------------------
[+ASM1:grid@ol7ora12r11][/home/grid]$ crsctl status resource ora.chad

NAME=ora.chad
TYPE=ora.chad.type
TARGET=ONLINE               , ONLINE
STATE=ONLINE on ol7ora12r11, ONLINE on ol7ora12r12

 

13. PSU 패치 롤백 작업 (각각의 노드에서 실행)

 

Supplemental Readme - Grid Infrastructure Release Update 12.2.0.1.x / 18c /19c (Doc ID 2246888.1)
--> 위 공식문서에서
"5 Manual Steps for Apply/Rollback Patch" --> 항목을 참고 할 것

 

--RAC 1번 노드

--> root os user
[root@ol7ora12r11][/root]$ $GRID_HOME/crs/install/rootcrs.sh -prepatch -rollback

 

--grid 패치 롤백 (grid os user)
[+ASM1:grid@ol7ora12r11][/home/grid]$ $GRID_HOME/OPatch/opatch rollback -local -id 33610989 -oh $GRID_HOME
[+ASM1:grid@ol7ora12r11][/home/grid]$ $GRID_HOME/OPatch/opatch rollback -local -id 26839277 -oh $GRID_HOME
[+ASM1:grid@ol7ora12r11][/home/grid]$ $GRID_HOME/OPatch/opatch rollback -local -id 33116894 -oh $GRID_HOME
[+ASM1:grid@ol7ora12r11][/home/grid]$ $GRID_HOME/OPatch/opatch rollback -local -id 33678030 -oh $GRID_HOME
[+ASM1:grid@ol7ora12r11][/home/grid]$ $GRID_HOME/OPatch/opatch rollback -local -id 33587128 -oh $GRID_HOME

--oracle 패치 롤백 (oracle os user)
[ORA12R11:oracle@ol7ora12r11][/home/oracle]$ $ORACLE_HOME/OPatch/opatch rollback -local -id 33678030 -oh $ORACLE_HOME
[ORA12R11:oracle@ol7ora12r11][/home/oracle]$ $ORACLE_HOME/OPatch/opatch rollback -local -id 33587128 -oh $ORACLE_HOME

--postpatch 작업 (root os user)
[root@ol7ora12r11][/root]$ $GRID_HOME/rdbms/install/rootadd_rdbms.sh
[root@ol7ora12r11][/root]$ $GRID_HOME/crs/install/rootcrs.sh -postpatch -rollback

 

-- "-MGMTDB" 롤백 확인
[+ASM1:grid@ol7ora12r11][/home/grid]$ export ORACLE_SID=-MGMTDB
[-MGMTDB:grid@ol7ora12r11][/home/grid]$ alias ss
alias ss='rlwrap sqlplus "/as sysdba"'

[-MGMTDB:grid@ol7ora12r11][/home/grid]$ ss

SQL*Plus: Release 12.2.0.1.0 Production on Fri Sep 12 14:31:37 2025

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL>
SET LINESIZE 200
SET PAGESIZE 100
SET WRAP OFF
COL PATCH_ID     FORMAT 99999999
COL PATCH_UID    FORMAT 99999999
COL VERSION      FORMAT A12
COL ACTION       FORMAT A10
COL STATUS       FORMAT A10
COL INSTALL_ID   FORMAT 999999
COL ACTION_TIME  FORMAT A19
COL DESCRIPTION  FORMAT A60 WORD_WRAPPED
SELECT PATCH_ID
     , PATCH_UID
     , VERSION
     , ACTION
     , STATUS
     , INSTALL_ID
     , TO_CHAR(ACTION_TIME,'YYYY-MM-DD HH24:MI:SS') AS ACTION_TIME
     , DESCRIPTION
  FROM DBA_REGISTRY_SQLPATCH
 ORDER BY ACTION_TIME;

 PATCH_ID PATCH_UID VERSION      ACTION     STATUS     INSTALL_ID ACTION_TIME         DESCRIPTION
--------- --------- ------------ ---------- ---------- ---------- ------------------- ------------------------------------------------------------
 33587128  24566093 12.2.0.1     APPLY      SUCCESS             1 2025-09-11 23:30:16 DATABASE JAN 2022 RELEASE UPDATE 12.2.0.1.220118
 33587128  24566093 12.2.0.1     ROLLBACK   SUCCESS             2 2025-09-12 14:27:54 DATABASE JAN 2022 RELEASE UPDATE 12.2.0.1.220118

 

--RAC 2번 노드
[root@ol7ora12r12][/root]$ $GRID_HOME/crs/install/rootcrs.sh -prepatch -rollback

 

--grid 패치 롤백 (grid os user)
[+ASM2:grid@ol7ora12r12][/home/grid]$ $GRID_HOME/OPatch/opatch rollback -local -id 33610989 -oh $GRID_HOME
[+ASM2:grid@ol7ora12r12][/home/grid]$ $GRID_HOME/OPatch/opatch rollback -local -id 26839277 -oh $GRID_HOME
[+ASM2:grid@ol7ora12r12][/home/grid]$ $GRID_HOME/OPatch/opatch rollback -local -id 33116894 -oh $GRID_HOME
[+ASM2:grid@ol7ora12r12][/home/grid]$ $GRID_HOME/OPatch/opatch rollback -local -id 33678030 -oh $GRID_HOME
[+ASM2:grid@ol7ora12r12][/home/grid]$ $GRID_HOME/OPatch/opatch rollback -local -id 33587128 -oh $GRID_HOME

 

--oracle 패치 롤백 (oracle os user)
[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ $ORACLE_HOME/OPatch/opatch rollback -local -id 33678030 -oh $ORACLE_HOME
[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ $ORACLE_HOME/OPatch/opatch rollback -local -id 33587128 -oh $ORACLE_HOME

 

--postpatch 작업 (root os user)
[root@ol7ora12r12][/root]$ $GRID_HOME/rdbms/install/rootadd_rdbms.sh
[root@ol7ora12r12][/root]$ $GRID_HOME/crs/install/rootcrs.sh -postpatch -rollback

 

--> oracle os user
[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ cd $ORACLE_HOME/OPatch
[ORA12R12:oracle@ol7ora12r12][/u01/app/oracle/product/12c/db_1/OPatch]$ mv $ORACLE_HOME/sqlplus/admin/glogin.sql $ORACLE_HOME/sqlplus/admin/glogin.sql.bak
[ORA12R12:oracle@ol7ora12r12][/u01/app/oracle/product/12c/db_1/OPatch]$ ./datapatch -verbose

[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ alias ss
alias ss='rlwrap sqlplus "/as sysdba"'
[ORA12R12:oracle@ol7ora12r12][/home/oracle]$ ss

SQL*Plus: Release 12.2.0.1.0 Production on Fri Sep 12 14:50:55 2025

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SET LINESIZE 200
SET PAGESIZE 100
SET WRAP OFF
COL PATCH_ID     FORMAT 99999999
COL PATCH_UID    FORMAT 99999999
COL VERSION      FORMAT A12
COL ACTION       FORMAT A10
COL STATUS       FORMAT A10
COL INSTALL_ID   FORMAT 999999
COL ACTION_TIME  FORMAT A19
COL DESCRIPTION  FORMAT A60 WORD_WRAPPED
SELECT PATCH_ID
     , PATCH_UID
     , VERSION
     , ACTION
     , STATUS
     , INSTALL_ID
     , TO_CHAR(ACTION_TIME,'YYYY-MM-DD HH24:MI:SS') AS ACTION_TIME
     , DESCRIPTION
  FROM DBA_REGISTRY_SQLPATCH
 ORDER BY ACTION_TIME;
 
  PATCH_ID PATCH_UID VERSION      ACTION     STATUS     INSTALL_ID ACTION_TIME         DESCRIPTION
--------- --------- ------------ ---------- ---------- ---------- ------------------- ------------------------------------------------------------
 33587128  24566093 12.2.0.1     APPLY      SUCCESS             1 2025-09-12 00:18:56 DATABASE JAN 2022 RELEASE UPDATE 12.2.0.1.220118
 33587128  24566093 12.2.0.1     ROLLBACK   SUCCESS             2 2025-09-12 14:50:43 DATABASE JAN 2022 RELEASE UPDATE 12.2.0.1.220118

 

[ORA12R12:oracle@ol7ora12r12][/u01/app/oracle/product/12c/db_1/OPatch]$ mv $ORACLE_HOME/sqlplus/admin/glogin.sql.bak $ORACLE_HOME/sqlplus/admin/glogin.sql

 

반응형

+ Recent posts