OS 환경 : Oracle Linux 8.8 (64bit)
DB 환경 : Oracle Database 23.7.0.25.01 ai for Oracle Cloud and Engineered Systems
방법 : 오라클 23ai 23.7 Exa 버전(정식23ai 버전X) 골드이미지 패치 가이드
본문에서는 오라클 23ai Engineered Systems 버전 23.5를 23.7로 패치하는 방법을 설명함
ru를 이용해 패치하는 방식이 아닌 골드이미지를 이용해 엔진을 교체하는 방식으로 패치를 진행함
23.7 ru 골드이미지는 888.1에서 다운로드 가능함
골드 이미지란?
간단하게 말해서 오라클 엔진의 복사본임
tar 명령으로도 오라클 엔진 경로를 묶어서 다른곳으로 복제, 이동할 수 있음
패치된 엔진도 가능하고, 서버 os만 같다면 다른 서버로도 옮길 수 있음
참고 : 오라클 19c 골드 이미지 이용해 db 엔진 복제 ( https://positivemh.tistory.com/1149 )
테스트
현재 23.5 엔진으로 기동되어 있는 상태
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
|
$ ps -ef|grep pmon
oracle 3473 1 0 23:43 ? 00:00:00 ora_pmon_oracle23
$ lsnrctl status
LSNRCTL for Linux: Version 23.0.0.0.0 - for Oracle Cloud and Engineered Systems on 06-MAY-2025 23:45:18
Copyright (c) 1991, 2024, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ora23)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 23.0.0.0.0 - for Oracle Cloud and Engineered Systems
Start Date 06-MAY-2025 23:43:51
Uptime 0 days 0 hr. 1 min. 27 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /app/oracle/product/23ai/network/admin/listener.ora
Listener Log File /app/oracle/diag/tnslsnr/ora23/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora23)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "1f2e1fea745ed86fe0631789a8c03e68" has 1 instance(s).
Instance "oracle23", status READY, has 1 handler(s) for this service...
Service "1f2fd9d07446fda2e0631789a8c0ebf2" has 1 instance(s).
Instance "oracle23", status READY, has 1 handler(s) for this service...
Service "oracle23" has 1 instance(s).
Instance "oracle23", status READY, has 1 handler(s) for this service...
Service "oracle23XDB" has 1 instance(s).
Instance "oracle23", status READY, has 1 handler(s) for this service...
Service "oracle23pdb1" has 1 instance(s).
Instance "oracle23", status READY, has 1 handler(s) for this service...
The command completed successfully
|
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 /app/oracle/product/23ai7
|
골드이미지 압축 해제
1
2
3
4
|
# chown oracle:dba p37370465_230000_Linux-x86-64\(exa_23700_gold_img\).zip
# mv p37370465_230000_Linux-x86-64\(exa_23700_gold_img\).zip /home/oracle/
$ cd /app/oracle/product/23ai7
$ unzip /home/oracle/p37370465_230000_Linux-x86-64\(exa_23700_gold_img\).zip
|
골드이미지 엔진 설치
예시 $ /runInstaller -silent -setupDBHomeAs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
$ cd /app/oracle/product/23ai7
$ ./runInstaller -silent -setupDBHomeAs /app/oracle/product/23ai
Launching Oracle Database Setup Wizard...
The response file for this session can be found at:
/app/oracle/product/23ai7/install/response/db_2025-05-06_11-46-05PM.rsp
You can find the log of this install session at:
/app/oraInventory/logs/InstallActions2025-05-06_11-46-05PM/installActions2025-05-06_11-46-05PM.log
As a root user, run the following script(s):
1. /app/oracle/product/23ai7/root.sh
Run /app/oracle/product/23ai7/root.sh on the following nodes:
[ora23]
Successfully Setup Software.
|
완료됨
root 유저로 root.sh 실행
1
2
|
# /app/oracle/product/23ai7/root.sh
Check /app/oracle/product/23ai7/install/root_ora23_2025-05-06_23-24-17-832110695.log for the output of root script
|
로그 확인
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
# cat /app/oracle/product/23ai7/install/root_ora23_2025-05-06_23-24-17-832110695.log
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /app/oracle/product/23ai7
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
2
3
4
5
6
7
8
|
$ lsnrctl stop
LSNRCTL for Linux: Version 23.0.0.0.0 - for Oracle Cloud and Engineered Systems on 06-MAY-2025 23:51:28
Copyright (c) 1991, 2024, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ora23)(PORT=1521)))
The command completed successfully
|
기존 엔진에 있던 파일 복제
1
2
3
|
$ cp /app/oracle/product/23ai/dbs/orapworacle23 /app/oracle/product/23ai7/dbs/
$ cp /app/oracle/product/23ai/dbs/spfileoracle23.ora /app/oracle/product/23ai7/dbs/
$ cp /app/oracle/product/23ai/network/admin/*.ora /app/oracle/product/23ai7/network/admin/
|
.bash_profile 수정
1
2
|
$ vi .bash_profile
export ORACLE_HOME=$ORACLE_BASE/product/23ai7;
|
적용 후 세션 재접속
1
2
3
|
$ . ./.bash_profile
$ exit
# su - oracle
|
오라클 홈 확인
1
2
|
$ echo $ORACLE_HOME
/app/oracle/product/23ai7
|
신규 홈으로 선택됨
23.7 엔진으로 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.0.0.0.0 - for Oracle Cloud and Engineered Systems on Tue May 6 23:53:20 2025
Version 23.7.0.25.01
Copyright (c) 1982, 2024, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 1239015464 bytes
Fixed Size 5423144 bytes
Variable Size 553648128 bytes
Database Buffers 671088640 bytes
Redo Buffers 8855552 bytes
Database mounted.
Database opened.
SQL> alter pluggable database all open;
Pluggable database altered.
|
참고1.
23.7이 아닌 23.8 엔진으로 기동시 에러 발생함(_exadata_feature_on=true로 되어있음에도 에러발생함)
23.8부터 이 방법이 더이상 사용 불가능한듯함
1
2
3
4
5
6
7
8
9
10
11
|
$ sqlplus / as sysdba
SQL*Plus: Release 23.0.0.0.0 - for Oracle Cloud and Engineered Systems on Sat May 31 15:57:44 2025
Version 23.8.0.25.04
Copyright (c) 1982, 2025, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-27350: This version of the Oracle Database software cannot be run on this platform
|
참고2. 아래 스위치 명령은 동작하지 않으므로 스킵하면됨
오라클홈 스위치
*원래 되야하는 명령이지만 둘다 안됨
1
2
3
4
5
6
7
8
9
10
11
12
13
|
예시 $ <TARGET_DB_HOME>/bin/dbca -silent -moveDatabase -sourceDB <DB_NAME>
구 엔진으로 기동후 수행시
$ /app/oracle/product/23ai7/bin/dbca -silent -moveDatabase -sourceDB oracle23
[FATAL] [DBT-11502] The instance (oracle23) is not running on the local node.
CAUSE: A locally running instance is required to perform the selected operation.
ACTION: Specify a locally running database, or execute DBCA on a node where the database instance is running.
신규 엔진으로 기동후 수행시
$ dbca -silent -moveDatabase -sourceDB 'oracle23'
[WARNING] [INS-08101] Unexpected error while running the action at state: 'MoveDatabase'
CAUSE: No additional information available.
ACTION: Contact Oracle Support Services or refer to the software manual.
SUMMARY:
- For input string: ""
|
*원래 되야하는 명령이지만 둘다 안됨
수동으로 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
|
$ cd $ORACLE_HOME/OPatch
$ ./datapatch -verbose
SQL Patching tool version 23.7.0.25.01 Lim on Tue May 7 00:05:05 2025
Copyright (c) 2012, 2025, Oracle. All rights reserved.
Log file for this invocation: /app/oracle/product/23ai7/cfgtoollogs/sqlpatch/sqlpatch_sid_oracle23_ts_2025_05_07_00_05_05_pid_15878/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.7.0.25.01 Release_Update 250116103325: Installed
PDB CDB$ROOT:
Applied 23.5.0.24.07 Release_Update 250116103325 successfully
PDB ORACLE23PDB1:
Applied 23.5.0.24.07 Release_Update 250116103325 successfully
PDB PDB$SEED:
Applied 23.5.0.24.07 Release_Update 250116103325 successfully
Adding patches to installation queue and performing prereq checks...done
Installation queue:
For the following PDBs: CDB$ROOT PDB$SEED ORACLE23PDB1
No interim patches need to be rolled back
Patch 37366180 (Database Release Update : 23.7.0.25.01 (37366180) Gold Image):
Apply from 23.5.0.24.07 Release_Update 250116103325 to 23.7.0.25.01 Release_Update 250116103325
No interim patches need to be applied
Installing patches...
Patch installation complete. Total patches installed: 3
Validating logfiles...done
Patch 37366180 apply (pdb CDB$ROOT): SUCCESS
logfile: /app/oracle/product/23ai7/cfgtoollogs/sqlpatch/sqlpatch_sid_oracle23_ts_2025_05_07_00_05_05_pid_15878/37366180_apply_ORACLE23_CDBROOT_2025May07_00_05_13.log (no errors)
Patch 37366180 apply (pdb PDB$SEED): SUCCESS
logfile: /app/oracle/product/23ai7/cfgtoollogs/sqlpatch/sqlpatch_sid_oracle23_ts_2025_05_07_00_05_05_pid_15878/37366180_apply_ORACLE23_PDBSEED_2025May07_00_08_05.log (no errors)
Patch 37366180 apply (pdb ORACLE23PDB1): SUCCESS
logfile: /app/oracle/product/23ai7/cfgtoollogs/sqlpatch/sqlpatch_sid_oracle23_ts_2025_05_07_00_05_05_pid_15878/37366180_apply_ORACLE23_ORACLE23PDB1_2025May07_00_08_05.log (no errors)
SQL Patching tool complete on Tue May 7 00:10:16 2025
|
datapatch 완료됨
패치내역 확인
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
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
-------------------- ---------- ---------- ------------------------------------------------------------ --------------- --------------- ----------
20250507 00:07:26 APPLY SUCCESS Database Release Update : 23.7.0.25.01 (37366180) Gold Image 23.5.0.24.07 23.7.0.25.01 37366180
|
정상적으로 패치됨
패치내역 확인
1
2
3
4
5
|
$ cd $ORACLE_HOME/OPatch/opatch lspatches
37369900;OCW RELEASE UPDATE 23.7.0.25.01 (37369900) Gold Image
37366180;Database Release Update : 23.7.0.25.01 (37366180) Gold Image
OPatch succeeded.
|
정상적으로 패치됨
결론 :
ru 방식으로 패치할수도 있지만 골드이미지를 이용해 다운타임을 조금 더 줄이면서 패치를 하는것도 가능함
골드이미지는 888.1에서 다운로드 받거나, sr을 통해 요청해서 다운로드 받을 수 있음
동일한 방식으로 23.7이 아닌 23.8 엔진으로 기동시 에러가 발생함(_exadata_feature_on=true로 되어있음에도 에러발생함)
아마 23.8부터 이 방법이 더이상 사용 불가능한듯함
참조 :
'ORACLE > Install' 카테고리의 다른 글
Oracle Linux 7.6에 Oracle 11gR2 Raw Device RAC 설치 가이드_Part 3 (0) | 2025.06.06 |
---|---|
Oracle Linux 7.6에 Oracle 11gR2 Raw Device RAC 설치 가이드_Part 2 (0) | 2025.06.06 |
Oracle Linux 7.6에 Oracle 11gR2 Raw Device RAC 설치 가이드_Part 1 (0) | 2025.06.06 |
Docker에 Oracle 23ai Free 설치 및 삭제 가이드 (0) | 2024.09.12 |
Oracle Linux 8.4에 Oracle 19c Silent 모드 설치 가이드 (1) | 2024.09.06 |