OS 환경 : Oracle Linux 8.10 (64bit)
DB 환경 : Oracle Database 23.7.0.25.01, 23.26.0.0.0 ai for Oracle Cloud and Engineered Systems
방법 : 오라클 26ai 23.26 골드이미지 패치 가이드
본문에서는 오라클 23ai Engineered Systems 버전 23.9를 26ai(23.26)로 패치하는 방법을 설명함
ru를 이용해 패치하는 방식이 아닌 골드이미지를 이용해 엔진을 교체하는 방식으로 패치를 진행함
26ai(23.26) ru 골드이미지는 888.1에서 다운로드 가능함
현재 db는 restart 환경이라 grid도 존재하지만 본문에서는 편의상 db만 패치함
골드 이미지란?
간단하게 말해서 오라클 엔진의 복사본임
tar 명령으로도 오라클 엔진 경로를 묶어서 다른곳으로 복제, 이동할 수 있음, 이 경우 .ora 파일들이 같이 이동됨
골드이미지의 경우 베이스 버전 설치파일처럼 깨끗한 상태의 압축파일임
패치된 엔진도 가능하고, 서버 os만 같다면 다른 서버로도 옮길 수 있음
888.1에서 최신 골드이미지도 다운로드 가능함
참고 : 오라클 19c 골드 이미지 이용해 db 엔진 복제 ( https://positivemh.tistory.com/1149 )
테스트
현재 23.9 엔진으로 기동되어 있는 상태
|
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
|
$ ps -ef|grep pmon
oracle 15129 1 0 Aug21 ? 00:14:24 ora_pmon_testdb
oracle 81818 81616 0 00:27 pts/0 00:00:00 grep --color=auto pmon
$ lsnrctl status
LSNRCTL for Linux: Version 23.0.0.0.0 - for Oracle Cloud and Engineered Systems on 15-OCT-2025 00:28:03
Copyright (c) 1991, 2025, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 23.0.0.0.0 - for Oracle Cloud and Engineered Systems
Start Date 21-AUG-2025 16:09:11
Uptime 54 days 8 hr. 18 min. 52 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/23.5.0.24/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/test-clnt/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.137.50)(PORT=1522)))
Services Summary...
Service "testdb" has 1 instance(s).
Instance "testdb", status READY, has 1 handler(s) for this service...
Service "testdbXDB" has 1 instance(s).
Instance "testdb", status READY, has 1 handler(s) for this service...
Service "testpdb" has 1 instance(s).
Instance "testdb", status READY, has 1 handler(s) for this service...
|
pdb까지 기동중임
패키지 업데이트
|
1
2
3
4
|
# dnf -y install binutils-2.30-113*
# dnf -y install libgcc-8.5.0*
# dnf -y install libstdc++-8.5.0*
# dnf -y install nfs-utils-2.3.3-51*
|
새 오라클홈 생성
|
1
2
|
# su - oracle
$ mkdir -p /u01/app/oracle/product/23.0.0.0/dbhome_3
|
골드이미지 압축 해제
|
1
2
3
4
|
# chown oracle:dba p38411960_230000_Linux-x86-64_goldimg23_26.zip
# cdmv p38411960_230000_Linux-x86-64_goldimg23_26.zip /home/oracle/
$ cd /u01/app/oracle/product/23.0.0.0/dbhome_3
$ unzip -q /home/oracle/p38411960_230000_Linux-x86-64_goldimg23_26.zip |
골드이미지 엔진 설치
예시 $ /runInstaller -silent -setupDBHomeAs <이전홈>
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
$ ./runInstaller -silent -setupDBHomeAs /u01/app/oracle/product/23.0.0.0/dbhome_2
Launching Oracle Database Setup Wizard...
The response file for this session can be found at:
/u01/app/oracle/product/23.0.0.0/dbhome_3/install/response/db_2025-10-15_01-01-39AM.rsp
You can find the log of this install session at:
/u01/app/oraInventory/logs/InstallActions2025-10-15_01-01-39AM/installActions2025-10-15_01-01-39AM.log
As a root user, run the following script(s):
1. /u01/app/oracle/product/23.0.0.0/dbhome_3/root.sh
Run /u01/app/oracle/product/23.0.0.0/dbhome_3/root.sh on the following nodes:
[test-clnt]
Successfully Setup Software.
|
완료됨
root 유저로 root.sh 실행
|
1
2
|
# /u01/app/oracle/product/23.0.0.0/dbhome_3/root.sh
Check /u01/app/oracle/product/23.0.0.0/dbhome_3/install/root_test-clnt_2025-10-15_01-06-00-741967155.log for the output of root script |
로그 확인
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
# cat /u01/app/oracle/product/23.0.0.0/dbhome_3/install/root_test-clnt_2025-10-15_01-06-00-741967155.log
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/23.0.0.0/dbhome_3
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
|
완료됨
기존 db 정지
|
1
2
|
$ sqlplus / as sysdba
SQL> shutdown immediate
|
리스너 정지
|
1
|
$ srvctl stop listener -l LISTENER
|
기존 엔진에 있던 파일 복제
|
1
2
3
|
$ cp /u01/app/oracle/product/23.0.0.0/dbhome_2/dbs/orapwtestdb /u01/app/oracle/product/23.0.0.0/dbhome_3/dbs
$ --cp /u01/app/oracle/product/23.0.0.0/dbhome_2/dbs/spfileoracle23.ora /u01/app/oracle/product/23.0.0.0/dbhome_3/dbs/
$ cp /u01/app/oracle/product/23.0.0.0/dbhome_2/network/admin/*.ora /u01/app/oracle/product/23.0.0.0/dbhome_3/network/admin/
|
restart 환경이라 spfile은 asm에 존재하기때문에 옮기지 않음
.bash_profile 수정
|
1
2
|
$ vi .bash_profile
export ORACLE_HOME=/u01/app/oracle/product/23.0.0.0/dbhome_3;
|
적용 후 세션 재접속
|
1
2
3
|
$ . ./.bash_profile
$ exit
# su - oracle
|
오라클 홈 확인
|
1
2
|
$ echo $ORACLE_HOME
/u01/app/oracle/product/23.0.0.0/dbhome_3
|
신규 홈으로 선택됨
grid에서 dbhome 확인 후 변경
|
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
|
$ srvctl config database -d testdb
Database unique name: testdb
Database name: testdb
Oracle home: /u01/app/oracle/product/23.0.0.0/dbhome_2
Oracle user: oracle
Spfile: +DATA/TESTDB/PARAMETERFILE/spfile.314.1201782067
Password file: +DATA/testdb/PASSWORD/orapwtestdb
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups:
Mount point paths:
Services:
Type: SINGLE
OSDBA group: dba
OSOPER group: dbaoper
Database instance: testdb
Configured nodes: test-clnt
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed
$ srvctl modify database -d testdb -oraclehome /u01/app/oracle/product/23.0.0.0/dbhome_3
$ srvctl config database -d testdb
Database unique name: testdb
Database name: testdb
Oracle home: /u01/app/oracle/product/23.0.0.0/dbhome_3
Oracle user: oracle
Spfile: +DATA/TESTDB/PARAMETERFILE/spfile.314.1201782067
Password file: +DATA/testdb/PASSWORD/orapwtestdb
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups:
Mount point paths:
Services:
Type: SINGLE
OSDBA group: dba
OSOPER group: dbaoper
Database instance: testdb
Configured nodes: test-clnt
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services:
Database is administrator managed
|
23.26 엔진으로 db 기동
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
$ sqlplus / as sysdba
SQL*Plus: Release 23.26.0.0.0 - for Oracle Cloud and Engineered Systems on Wed Oct 15 01:14:58 2025
Version 23.26.0.0.0
Copyright (c) 1982, 2025, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 8159904352 bytes
Fixed Size 5026400 bytes
Variable Size 2248146944 bytes
Database Buffers 5872025600 bytes
Redo Buffers 34705408 bytes
Database mounted.
Database opened.
SQL> alter pluggable database all open;
Pluggable database altered.
|
수동으로 db에 패치 적용(db에 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
$ cd $ORACLE_HOME/OPatch
$ pwd
/u01/app/oracle/product/23.0.0.0/dbhome_3/OPatch
$ ./datapatch -verbose
SQL Patching tool version 23.26.0.0.0 Lim on Wed Oct 15 01:16:36 2025
Copyright (c) 2012, 2025, Oracle. All rights reserved.
Log file for this invocation: /u01/app/oracle/product/23.0.0.0/dbhome_3/cfgtoollogs/sqlpatch/sqlpatch_sid_testdb_ts_2025_10_15_01_16_36_pid_20238/sqlpatch_invocation.log
Connecting to database...OK
Gathering database info...done
Note: Datapatch will only apply or rollback SQL fixes for PDBs
that are in an open state, no patches will be applied to closed PDBs.
Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
(Doc ID 1585822.1)
Bootstrapping registry and package to current versions...done
Determining current state...done
Current state of interim SQL patches:
No interim patches found
Current state of release update SQL patches:
Binary registry:
23.26.0.0.0 Release_Update 250927052030: Installed
PDB CDB$ROOT:
Applied 23.9.0.25.07 Release_Update 250713160318 successfully on 24-JUL-25 11.50.02.287133 PM
PDB PDB$SEED:
Applied 23.9.0.25.07 Release_Update 250713160318 successfully on 24-JUL-25 11.57.38.079880 PM
PDB TESTPDB:
Applied 23.9.0.25.07 Release_Update 250713160318 successfully on 24-JUL-25 11.56.51.664077 PM
Adding patches to installation queue and performing prereq checks...done
Installation queue:
For the following PDBs: CDB$ROOT PDB$SEED TESTPDB
No interim patches need to be rolled back
Patch 38404116 (Database Release Update : 23.26.0.0.0 (38404116) Gold Image):
Apply from 23.9.0.25.07 Release_Update 250713160318 to 23.26.0.0.0 Release_Update 250927052030
No interim patches need to be applied
Installing patches...
Patch installation complete. Total patches installed: 3
Validating logfiles...done
Patch 38404116 apply (pdb CDB$ROOT): SUCCESS
logfile: /u01/app/oracle/product/23.0.0.0/dbhome_3/cfgtoollogs/sqlpatch/sqlpatch_sid_testdb_ts_2025_10_15_01_16_36_pid_20238/38404116_apply_TESTDB_CDBROOT_2025Oct15_01_17_01.log (no errors)
Patch 38404116 apply (pdb PDB$SEED): SUCCESS
logfile: /u01/app/oracle/product/23.0.0.0/dbhome_3/cfgtoollogs/sqlpatch/sqlpatch_sid_testdb_ts_2025_10_15_01_16_36_pid_20238/38404116_apply_TESTDB_PDBSEED_2025Oct15_01_23_13.log (no errors)
Patch 38404116 apply (pdb TESTPDB): SUCCESS
logfile: /u01/app/oracle/product/23.0.0.0/dbhome_3/cfgtoollogs/sqlpatch/sqlpatch_sid_testdb_ts_2025_10_15_01_16_36_pid_20238/38404116_apply_TESTDB_TESTPDB_2025Oct15_01_23_13.log (no errors)
SQL Patching tool complete on Wed Oct 15 01:27:52 2025
|
datapatch 완료됨
패치내역 확인
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
SQL>
set lines 200 pages 1000
col action_time for a20
col action for a10
col status for a10
col description for a60
col version for 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
-------------------- ---------- ---------- ------------------------------------------------------------ --------------- --------------- ----------
20250724 23:50:02 APPLY SUCCESS Database Release Update : 23.9.0.25.07 (38048302) Gold Image 23.5.0.24.07 23.9.0.25.07 38048302
20251015 01:22:38 APPLY SUCCESS Database Release Update : 23.26.0.0.0 (38404116) Gold Image 23.9.0.25.07 23.26.0.0.0 38404116
|
정상적으로 패치됨
패치내역 확인
|
1
2
3
4
5
|
$ $ORACLE_HOME/OPatch/opatch lspatches -oh $ORACLE_HOME
38405123;OCW RELEASE UPDATE 23.26.0.0.0 (38405123) Gold Image
38404116;Database Release Update : 23.26.0.0.0 (38404116) Gold Image
OPatch succeeded.
|
정상적으로 패치됨
db 버전 확인
|
1
2
3
4
5
6
7
8
9
10
11
12
|
SQL> select * from v$version;
BANNER
---------------------------------------------------------------------------------------------------------------------------------
BANNER_FULL
----------------------------------------------------------------------------------------------------------------------------------------------
BANNER_LEGACY CON_ID
--------------------------------------------------------------------------------------------------------------------------------- ----------
Oracle AI Database 26ai Enterprise Edition Release 23.26.0.0.0 - for Oracle Cloud and Engineered Systems
Oracle AI Database 26ai Enterprise Edition Release 23.26.0.0.0 - for Oracle Cloud and Engineered Systems
Version 23.26.0.0.0
Oracle AI Database 26ai Enterprise Edition Release 23.26.0.0.0 - for Oracle Cloud and Engineered Systems 0
|
정상적으로 Oracle AI Database 26ai 23.26 버전으로 표시됨
결론 :
ru 방식으로 패치할수도 있지만 골드이미지를 이용해 다운타임을 조금 더 줄이면서 패치를 하는것도 가능함
골드이미지는 888.1에서 다운로드 받거나, sr을 통해 요청해서 다운로드 받을 수 있음
참조 :
https://positivemh.tistory.com/1103
출처: https://positivemh.tistory.com/1287
'컴퓨터 활용(한글, 오피스 등) > 기타' 카테고리의 다른 글
| [Doxygen] Doxygen 사용법, 예제 (0) | 2025.11.27 |
|---|---|
| SAN Switch (0) | 2025.11.27 |
| Citrix VDI 환경에서 Oracle XE 설치 (0) | 2025.11.25 |
| 정보구조설계 (0) | 2025.11.23 |
| 20종류 오픈소스 브라우져들 (0) | 2025.11.23 |