반응형

Read-Only 오라클 홈 아키텍처는 순수한 소프트웨어 바이너리(설치본) 영역과 시스템 운영 중에 변경되는 설정 및 로그 데이터 영역을 완벽하게 분리하는 구조를 의미.

주의: '읽기 전용'이라는 표현이 운영체제(OS) 레벨에서 디렉터리나 파일 시스템 자체가 Read-Only로 마운트되어야 함을 뜻하는 것은 아닙니다. 파일 시스템과 마운트 포인트는 항상 읽기/쓰기(Read/Write)가 가능한 상태여야 합

 

Oracle Home 상태 확인(변경 전)

[oracle@ai26readonly dbhome_1]$
[oracle@ai26readonly dbhome_1]$ id
uid=5001(oracle) gid=500(dba) groups=500(dba) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[oracle@ai26readonly dbhome_1]$
[oracle@ai26readonly dbhome_1]$ env | grep SID
ORACLE_SID=CDB1
[oracle@ai26readonly dbhome_1]$ cd $ORACLE_HOME/bin
[oracle@ai26readonly bin]$ pwd
/u01/app/oracle/product/26.0.0/dbhome_1/bin
[oracle@ai26readonly bin]$
[oracle@ai26readonly bin]$ ./orabasehome
/u01/app/oracle/product/26.0.0/dbhome_1
[oracle@ai26readonly bin]$
반환된 경로가 $ORACLE_HOME과 같다면 ➔ Read/Write 모드
반환된 경로가 $ORACLE_BASE/homes/HOME_NAME 형태라면 ➔ Read-Only 모드

 

Read Only로 변경

[oracle@ai26readonly bin]$ id
uid=5001(oracle) gid=500(dba) groups=500(dba) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[oracle@ai26readonly bin]$ pwd
/u01/app/oracle/product/26.0.0/dbhome_1/bin
[oracle@ai26readonly bin]$
[oracle@ai26readonly bin]$ ls -al roohctl
-rwxr-x---. 1 oracle dba 5250 Jul  1 15:04 roohctl
[oracle@ai26readonly bin]$
[oracle@ai26readonly bin]$ ./roohctl -enable
Enabling Read-Only Oracle home.
Update orabasetab file to enable Read-Only Oracle home.
Orabasetab file has been updated successfully.
Create bootstrap directories for Read-Only Oracle home.
Bootstrap directories have been created successfully.
Bootstrap files have been processed successfully.
Bootstrap files have been processed successfully.
Read-Only Oracle home has been enabled successfully.
Check the log file /u01/app/oracle/cfgtoollogs/roohctl/roohctl-260701PM033927.log for more details.
[oracle@ai26readonly bin]$
[oracle@ai26readonly bin]$ ./orabasehome
/u01/app/oracle/homes/OraDB23Home1
[oracle@ai26readonly bin]$
[oracle@ai26readonly bin]$ cd /u01/app/oracle/homes/OraDB23Home1
[oracle@ai26readonly OraDB23Home1]$ ls
assistants  dbs  drdaas  hs  install  mgw  network  rdbms
[oracle@ai26readonly OraDB23Home1]$

 

Oracle DB,리스너 생성 후 확인

[oracle@ai26readonly ~]$ id
uid=5001(oracle) gid=500(dba) groups=500(dba) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[oracle@ai26readonly ~]$ env | grep SID
ORACLE_SID=CDB1
[oracle@ai26readonly ~]$
[oracle@ai26readonly ~]$ ps -ef | grep tns
root           8       2  0 08:48 ?        00:00:00 [kworker/R-netns]
oracle     30580       1  0 13:00 ?        00:00:00 /u01/app/oracle/product/26.0.0/dbhome_1/bin/tnslsnr LISTENER -inherit
oracle     30625    4282  0 13:01 pts/0    00:00:00 grep --color=auto tns
[oracle@ai26readonly ~]$
[oracle@ai26readonly ~]$
[oracle@ai26readonly ~]$ lsnrctl status

LSNRCTL for Linux: Version 23.26.1.0.0 - Production on 02-JUL-2026 13:01:51

Copyright (c) 1991, 2026, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ai26readonly)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 23.26.1.0.0 - Production
Start Date                02-JUL-2026 13:00:49
Uptime                    0 days 0 hr. 1 min. 1 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/homes/OraDB23Home1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/ai26readonly/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ai26readonly)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "5598f6714447661ae0636538a8c0b5af" has 1 instance(s).
  Instance "CDB1", status READY, has 1 handler(s) for this service...
Service "CDB1" has 1 instance(s).
  Instance "CDB1", status READY, has 1 handler(s) for this service...
Service "CDB1XDB" has 1 instance(s).
  Instance "CDB1", status READY, has 1 handler(s) for this service...
Service "pdb1" has 1 instance(s).
  Instance "CDB1", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@ai26readonly ~]$
[oracle@ai26readonly ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 23.26.1.0.0 - Production on Thu Jul 2 13:01:57 2026
Version 23.26.1.0.0

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


Connected to:
Oracle AI Database 26ai Enterprise Edition Release 23.26.1.0.0 - Production
Version 23.26.1.0.0

SQL> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      /u01/app/oracle/dbs/spfileCDB1.ora
SQL> exit
Disconnected from Oracle AI Database 26ai Enterprise Edition Release 23.26.1.0.0 - Production
Version 23.26.1.0.0
[oracle@ai26readonly ~]$

 

 

반응형

+ Recent posts