[INS-06006] Passwordless SSH connectivity not set up between the following node(s)

- 2탄 -

 

RAC 설치 작업 하다보면 위의 메세지를 흔하게 보게 되는데..

 

해당 메세지의 passwordless ssh 접속불가으로 인해 문제로 고통받는 많은 유저분들을 위해 몇자 적는다.

INS-06006 GI RunInstaller Fails If OpenSSH Is Upgraded to 8.x (Doc ID 2555697.1)

OpenSSH 버전 9.x 대가 설치되어 있는 경우 해당 문서의 기존 workaround 방법이 먹히지 않는 경우가 종종 있다.

현재는 AIX 나 Solaris 계열에서만 해당 증상이 나타나고 있으며 RHEL Linux 계열은 아직 OpenSSH 8.x 가 채택되어 거의 문제가 없다. (주로 RHEL8, RHEL 9 를 사용하고 있으므로)

RHEL 10 부터는 OpenSSH 9.x 가 기본으로 설치되고. 9.x 에서는 새로운 옵션인 -O 가 생겼다.

[root@rhel10 ~]# ssh -V
OpenSSH_9.9p1, OpenSSL 3.2.2 4 Jun 2024

 -O      Use the legacy SCP protocol for file transfers instead of the SFTP protocol.  Forcing the use of the SCP protocol
         may be necessary for servers that do not implement SFTP,  for  backwards-compatibility  for  particular  filename
         wildcard patterns and for expanding paths with a ‘~’ prefix for older SFTP servers.
 
 -> SFTP 프로토콜 대신 레거시 SCP 프로토콜 사용하도록 강제화 함.
 
- 기존의 workaround 해결방법에서 -O 추가옵션 사용가능 (대문자 오)

설치전
# Rename the original scp.
mv /usr/bin/scp /usr/bin/scp.orig

# Create a new file </usr/bin/scp>.
vi /usr/bin/scp

# Add the below line to the new created file </usr/bin/scp>.
/usr/bin/scp.orig -T -O $*

# Change the file permission.
chmod 555 /usr/bin/scp

설치후
mv /usr/bin/scp.orig /usr/bin/scp

다시 passwordless ssh 접속 시도..성공하시길 !!

 

 

Posted by pat98

Critical Patch Update (CPU) Program Jul 2025 Patch Availability Document (DB-only) (Doc ID 3086459.1)

패치작업 19.28.0.0.250715 (GI RU 37957391 )

Database Patch Set Update : 19.28.0.0.250715 (37960098)
OCW Patch Set Update      : 19.28.0.0.250715 (37962946)
ACFS Patch Set Update     : 19.28.0.0.250715 (37962938)
Tomcat Release Update     : 19.0.0.0.0       (38124772)
DBWLM Release Update      : 19.0.0.0.0       (36758186)

Oracle Grid Infrastructure Patch Set Update 19.28.0.0.250715 
-------------------------------------
GI_HOME, ORACLE_HOME 을 개별로 각각 할때

- grid 유저
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/37957391/37960098
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/37957391/37962946
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/37957391/37962938
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/37957391/36758186
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/37957391/38124772

- oracle 유저
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/37957391/37960098
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/patch/37957391/37962946

(oracle)
$ <ORACLE_HOME>/bin/srvctl stop home -o <ORACLE_HOME> -s <status file location> -n <node name>

(root 유저)
export GI_HOME=/u01/app/19.0.0.0/grid
$GI_HOME/crs/install/rootcrs.sh -prepatch 

(grid 유저)
export GI_HOME=/u01/app/19.0.0.0/grid
cd /u01/patch
$GI_HOME/OPatch/opatch apply -oh $GI_HOME -local /u01/patch/37957391/37962946 -silent
$GI_HOME/OPatch/opatch apply -oh $GI_HOME -local /u01/patch/37957391/37962938 -silent
$GI_HOME/OPatch/opatch apply -oh $GI_HOME -local /u01/patch/37957391/37960098 -silent
$GI_HOME/OPatch/opatch apply -oh $GI_HOME -local /u01/patch/37957391/36758186 -silent
$GI_HOME/OPatch/opatch apply -oh $GI_HOME -local /u01/patch/37957391/38124772 -silent

(oracle 유저)
export ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_1
cd /u01/patch
./37957391/37962946/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /u01/patch/37957391/37962946 -silent
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /u01/patch/37957391/37960098 -silent
./37957391/37962946/custom/scripts/postpatch.sh -dbhome $ORACLE_HOME 

(root 유저)
export GI_HOME=/u01/app/19.0.0.0/grid
$GI_HOME/rdbms/install/rootadd_rdbms.sh
$GI_HOME/crs/install/rootcrs.sh -postpatch 

(oracle)
$ <ORACLE_HOME>/bin/srvctl start home -o <ORACLE_HOME> -s <status file location> -n <node name> 

- Loading Modified SQL Files into the Database
sqlplus /nolog
SQL> conect / as sysdba
SQL> startup
SQL> quit
cd $ORACLE_HOME/OPatch
./datapatch -verbose

### [롤백하는 경우] ###########

(oracle)
$ <ORACLE_HOME>/bin/srvctl stop home -o <ORACLE_HOME> -s <status file location> -n <node name>

GI Home
(root로)
$GI_HOME/crs/install/rootcrs.sh -prepatch -rollback

(grid 유저로)
export GI_HOME=/u01/app/19.0.0.0/grid
cd /u01/install
$GI_HOME/OPatch/opatch nrollback -local -id 37962946,37962938,37960098,36758186,38124772 -oh $GI_HOME -silent

(oracle 유저로)
export ORACLE_HOME=/u01/app/oracle/product/19.0.0.0/dbhome_1
cd /u01/install
./37957391 /37962946/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME 
$ORACLE_HOME/OPatch/opatch nrollback -local -id 37962946,37960098 -oh /u01/app/oracle/product/19.0.0.0/dbhome_1 -silent
./37957391 /37962946/custom/scripts/postpatch.sh -dbhome $ORACLE_HOME

Run post script
(root로)
export GI_HOME=/u01/app/19.0.0.0/grid
$GI_HOME/rdbms/install/rootadd_rdbms.sh
$GI_HOME/crs/install/rootcrs.sh -postpatch -rollback

(oracle)
$ <ORACLE_HOME>/bin/srvctl start home -o <ORACLE_HOME> -s <status file location> -n <node name>

sqlplus /nolog
SQL> conect / as sysdba
SQL> startup
SQL> quit
cd $ORACLE_HOME/OPatch
./datapatch -verbose

Posted by pat98

2025. 6. 23. 23:19 오라클

EM 24ai 설치


Release 된 지는 한참 되었는데 2월에 설치만 해 보고 이제서야 정리해 본다.

 

영어가 제일 쉬었어요 하는 분들은 아래 메뉴얼을 참고하시기 바란다.

https://docs.oracle.com/en/enterprise-manager/cloud-control/enterprise-manager-cloud-control/24.1/embsc/installing-oracle-enterprise-manager.html#GUID-D0C8EB92-8297-4FF9-A721-BDD2425243C4

 

우선 EM 설치 진행전 EM Repository DB를 미리 생성해야 하는데 아직 24ai Repository  DB용 Template 가 배포되지 않아서 기존에 배포된 19c Template 지정해서 DB생성하면 Error 발생하므로 Database 생성옵션에서 Custom 선택 후  빈 껍데기 수동으로 생성하여 작업하도록 한다.

 

시도해 보면 계속 이런 에러가 뜰것이다. 나처럼 해결해 볼려고 하면 정신건강에 좋지 않으니 빨리 포기하도록 하자.

ERROR:The database for which you have provided details already has a valid SYSMAN schema, but not an OPSS schema. Ensure that it also has an OPSS schema. Otherwise, drop the SY[oracle:/tmp/OraInstall2025-02-14_09-08-34AM]

 

Release 해 놓고 6개월 넘었는데 아직도 Template 제공 안하는건 뭐하자는 건지...개발자들 일해라!!! ..

https://docs.oracle.com/en/enterprise-manager/cloud-control/enterprise-manager-cloud-control/24.1/embsc/creating-database-instance-preconfigured-repository-using-database-templates1.html#GUID-AD704CBD-0C7B-43E6-B413-A87A95FA2722

 

아무튼 EM 24ai 설치파일은  5개로 구성되어 있다. (현재버전은 24.1)

em24100_linux64.bin

em24100_linux64-2.bin

em24100_linux64-3.bin

em24100_linux64-4.bin

em24100_linux64-5.bin           

 

Repository  DB 준비된 상태에서 임치 위치에 모든 설치화일을 올리고  em24100_linux64.bin 실행한다.  X환경이 준비되어야 한다.

(압축은 /tmp/임의이름/Disk1, Disk2, ...Disk5 까지 자체적으로 풀림)

export DISPLAY=xxx.xxx.xx.xx:0.0

[oracle:/u01/install]#./em24100_linux64.bin

 

 

(Advanced) 선택

 

(Skip) 선택  [Next >] 선택

 

호스트 네임에 도메인 네임이 없는 경고 발생, [Ignore] 선택 , [Next >] 선택

 

미들웨어  위치 지정 , [Next >] 선택

 

Plug-in 선택한 , [Next >] 선택 (여기서는 Exadata 기준의 Plug-in 선택)

 

 

Weblogic Domain, nodemanager 계정, Instance 기본 위치 설정 , [Next >] 선택

 

 

Repository DB 연결 정보 입력 , [Next >] 선택

 

수행할 User 지정, [Next >] 선택

 

사전 요구사항 체크후, [Next] 선택

Custom 으로 Repository Database 생성하였을 경우, 사전조치 사항해야 한다.

 

SQL> alter system set "_allow_insert_with_update_check"=TRUE scope=spfile;

 

Repository DB의 유저와 데이터파일 설정. 적당한 값을 입력한 후, [Next]

 

SW Library  사용유무  선택하고, [Next >] 선택

 

OMS/Agent가 사용하는 Port 목록. 변경해야  필요가 있다면 변경하고, [Next >] 선택

 

 

 

  기본적으로 First available port  사용하게 되어 있으나, 보통 upload  Port  4889 (http), 1159 (https)  지정하며 Console Port  7788 (http), 7803 (https)  지정하도록 한다. Review 화면, 설정 값들을 확인하고 이상 없다면 [Install] 선택

 

설치화면 진행..인고의 시간 (워낙 깔리는게 많아서 사양에 따라 3~4시간 소요된다.)

 

 

 , 설치 진행 화면이 진행되고, 아래의 스크립트를 실행하라는 팝업 창이 뜨면  root 유저로 스크립트를 실행 , [OK] 선택 하여 팝업 창을 닫고, [Close] 선택하여 설치 종료

/u01/app/Middleware/oms_home/allroot.sh

 

설치완료 (설정된 포트  확인)

 

설치가 완료되었다면 접속해 보도록 하자.

 

https://<EM_HOST_NAME or EM_IP_ADDRESS>:7803/em 

 

접속해 보면 기존의 오른쪽에 있던 Navigation Menu 왼쪽에 햄버거 버튼으로 대체되었다.

나머지는 메뉴 및 기능은 기존 버전과 거의 유사하다. 

 

Posted by pat98

19.26 부터 추가된 impdp 옵션 (23ai 에서 사용가능, 정확히는 23.8 부터)

 

ONESTEP_INDEX 와 INDEX_THRESHOLD 라는 2가지 옵션이 생겼다. 이 두가지 옵션은 서로 같이 사용해야 하는 듯 하다.

 

1. ONESTEP_INDEX

When TRUE, creates all indexes concurrently with DOP=1 and when

FALSE (the default) uses 2-step process to maximize performance.

 

2. INDEX_THRESHOLD

Table size (in bytes) where index created with DOP=1 when less

than the threshold and with optimal DOP when greater.

-> default 150M

 

* INDEX_THRESHOLD 에 지정가능한 String 단위는 아래와 같다.

1000B, 100k, 200kb, 100M, 200mb, 100G, 200gb, 100t, 200TB.

 

이를 이해하기 위해서는 기존의 datapump 사용시 parallel 사용에 대한 이해가 필요하다.

 

- 11g 경우

PARALLEL=16. Data Pump는 하나의 작업자 프로세스를 사용하여 한 번에 하나씩 인덱스를 생성함 CREATE INDEX ... PARALLEL 16. 이는 큰 인덱스에 효율적..

 

- 12c 경우

12c에서는 더 많은 인덱스, 특히 여러 개의 작은 인덱스가 있는 스키마에 더 잘 맞도록 알고리즘이 변경됨. Data Pump 16개의 Woker를 모두 사용하고, Woker를 사용하여 인덱스를 생성. CREATE INDEX ... PARALLEL 1. 

이는 대규모 인덱스의 경우 성능 저하 요인이 될수 있음 .

 

- 19c (19.26 이상), 23ai

19c, 23ai에서는 이 두가지 이점을 사용할 수 있음. Pump는 테이블 크기를 사용하여 최적의 병렬도를 결정한다. 대규모 배치시는의 최적 병렬도(DOP)를 사용하여 더 작은 인덱스를 생성하고 PARALLEL 1, 최대의 최적 병렬도를 사용하여 더 큰 인덱스를 생성한다. PARALLEL 15

 

 

- table 크기가 150 M 이하일 때는 무조건 parallel=1

- 무조건 성능이 좋게 나온다고 보장하지 않기 때문에 운영 시스템 환경에 따라 적절히 테스트 하여 작업할 필요 있음.

Posted by pat98

Steps to rename the cluster name (Doc ID 2725377.1)

1. cemutlo -n

2. $GI_HOME/bin/crsrename cluster <new_clustername>" <--- 한쪽에서만 실행, 변경될때 시간조금 걸림 30초 정도

3. crsctl stop crs        
4. crsctl start crs -wait 

5. cemutlo -n

=======================================

- 테스트 과정은 아래와 같다.

 

ocfs-cluster -> test-cluster 로 변경

 

[root@ocfs1:/root]# cemutlo -n
ocfs-cluster
[root@ocfs1:/root]# crsrename cluster test-cluster
CRS-42004: successfully set the cluster name; restart Oracle High Availability Services on all nodes for new cluster name to take effect

 

이때 확인해 보면 crsd 는 내려가 있음.

 

root@ocfs1:/root]# cemutlo -n
/u01/app/19.3.0.0/grid/bin/cemutlo.bin: Failed to initialize communication with CSS daemon, error code 3

 

[root@ocfs1:/root]# crsctl stat res -t -init
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.asm
      1        OFFLINE OFFLINE                               STABLE
ora.cluster_interconnect.haip
      1        OFFLINE OFFLINE                               STABLE
ora.crf
      1        ONLINE  ONLINE       ocfs1                    STABLE
ora.crsd
      1        OFFLINE OFFLINE                               STABLE
ora.cssd
      1        OFFLINE OFFLINE                               STABLE
ora.cssdmonitor
      1        OFFLINE OFFLINE                               STABLE
ora.ctssd
      1        OFFLINE OFFLINE                               STABLE
ora.diskmon
      1        OFFLINE OFFLINE                               STABLE
ora.drivers.acfs
      1        ONLINE  ONLINE       ocfs1                    STABLE
ora.evmd
      1        OFFLINE OFFLINE                               STABLE
ora.gipcd
      1        ONLINE  ONLINE       ocfs1                    STABLE
ora.gpnpd
      1        ONLINE  ONLINE       ocfs1                    STABLE
ora.mdnsd
      1        ONLINE  ONLINE       ocfs1                    STABLE
ora.storage
      1        OFFLINE OFFLINE                               STABLE
--------------------------------------------------------------------------------

 

ohasd daemon 만 떠 있다.

 

[root@ocfs1:/root]# ps -ef |grep d.bin
root     12800     1  1 12:38 ?        00:00:09 /u01/app/19.3.0.0/grid/bin/ohasd.bin reboot _ORA_BLOCKING_STACK_LOCALE=AMERICAN_AMERICA.US7ASCII
oracle   13092     1  0 12:38 ?        00:00:01 /u01/app/19.3.0.0/grid/bin/oraagent.bin
oracle   13118     1  0 12:38 ?        00:00:00 /u01/app/19.3.0.0/grid/bin/mdnsd.bin
oracle   13152     1  0 12:38 ?        00:00:01 /u01/app/19.3.0.0/grid/bin/gpnpd.bin
oracle   13306     1  0 12:38 ?        00:00:05 /u01/app/19.3.0.0/grid/bin/gipcd.bin
root     13479     1  1 12:38 ?        00:00:06 /u01/app/19.3.0.0/grid/bin/osysmond.bin
root     29355     1  0 12:45 ?        00:00:00 /u01/app/19.3.0.0/grid/bin/orarootagent.bin
root     32424  2837  0 12:48 pts/0    00:00:00 grep --color=auto d.bin


[root@ocfs1:/root]# crsctl stop crs 
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'ocfs1'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'ocfs1'
CRS-2673: Attempting to stop 'ora.crf' on 'ocfs1'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'ocfs1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'ocfs1'
CRS-2677: Stop of 'ora.drivers.acfs' on 'ocfs1' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'ocfs1' succeeded
CRS-2677: Stop of 'ora.crf' on 'ocfs1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'ocfs1'
CRS-2677: Stop of 'ora.mdnsd' on 'ocfs1' succeeded
CRS-2677: Stop of 'ora.gipcd' on 'ocfs1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ocfs1' has completed
CRS-4133: Oracle High Availability Services has been stopped.


[root@ocfs1:/root]# crsctl start crs -wait
CRS-4123: Starting Oracle High Availability Services-managed resources
CRS-2672: Attempting to start 'ora.mdnsd' on 'ocfs1'
CRS-2672: Attempting to start 'ora.evmd' on 'ocfs1'
CRS-2676: Start of 'ora.mdnsd' on 'ocfs1' succeeded
CRS-2676: Start of 'ora.evmd' on 'ocfs1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'ocfs1'
CRS-2676: Start of 'ora.gpnpd' on 'ocfs1' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'ocfs1'
CRS-2676: Start of 'ora.gipcd' on 'ocfs1' succeeded
CRS-2672: Attempting to start 'ora.crf' on 'ocfs1'
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'ocfs1'
CRS-2676: Start of 'ora.cssdmonitor' on 'ocfs1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'ocfs1'
CRS-2672: Attempting to start 'ora.diskmon' on 'ocfs1'
CRS-2676: Start of 'ora.diskmon' on 'ocfs1' succeeded
CRS-2676: Start of 'ora.crf' on 'ocfs1' succeeded
CRS-2676: Start of 'ora.cssd' on 'ocfs1' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'ocfs1'
CRS-2672: Attempting to start 'ora.ctssd' on 'ocfs1'
CRS-2672: Attempting to start 'ora.storage' on 'ocfs1'
CRS-2676: Start of 'ora.storage' on 'ocfs1' succeeded
CRS-2676: Start of 'ora.ctssd' on 'ocfs1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'ocfs1'
CRS-2676: Start of 'ora.crsd' on 'ocfs1' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'ocfs1' succeeded
CRS-6023: Starting Oracle Cluster Ready Services-managed resources
CRS-6017: Processing resource auto-start for servers: ocfs1
CRS-2672: Attempting to start 'ora.scan1.vip' on 'ocfs1'
CRS-2672: Attempting to start 'ora.ocfs1.vip' on 'ocfs1'
CRS-2672: Attempting to start 'ora.ons' on 'ocfs1'
CRS-2672: Attempting to start 'ora.qosmserver' on 'ocfs1'
CRS-2672: Attempting to start 'ora.chad' on 'ocfs1'
CRS-2672: Attempting to start 'ora.ocfs2.vip' on 'ocfs1'
CRS-2672: Attempting to start 'ora.cvu' on 'ocfs1'
CRS-2676: Start of 'ora.ocfs1.vip' on 'ocfs1' succeeded
CRS-2676: Start of 'ora.ocfs2.vip' on 'ocfs1' succeeded
CRS-2676: Start of 'ora.scan1.vip' on 'ocfs1' succeeded
CRS-2676: Start of 'ora.cvu' on 'ocfs1' succeeded
CRS-2676: Start of 'ora.chad' on 'ocfs1' succeeded
CRS-2676: Start of 'ora.ons' on 'ocfs1' succeeded
CRS-2676: Start of 'ora.qosmserver' on 'ocfs1' succeeded
CRS-6017: Processing resource auto-start for servers: ocfs1,ocfs2
CRS-2672: Attempting to start 'ora.ASMNET1LSNR_ASM.lsnr' on 'ocfs1'
CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'ocfs1'
CRS-2672: Attempting to start 'ora.chad' on 'ocfs2'
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'ocfs1'
CRS-2672: Attempting to start 'ora.ons' on 'ocfs2'
CRS-2677: Stop of 'ora.scan1.vip' on 'ocfs1' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'ocfs2'
CRS-2676: Start of 'ora.chad' on 'ocfs2' succeeded
CRS-2676: Start of 'ora.ASMNET1LSNR_ASM.lsnr' on 'ocfs1' succeeded
CRS-2676: Start of 'ora.LISTENER.lsnr' on 'ocfs1' succeeded
CRS-2676: Start of 'ora.scan1.vip' on 'ocfs2' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'ocfs2'
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'ocfs2' succeeded
CRS-2676: Start of 'ora.ons' on 'ocfs2' succeeded
CRS-2672: Attempting to start 'ora.ocfs.db' on 'ocfs1'
CRS-2672: Attempting to start 'ora.ocfs.db' on 'ocfs2'
CRS-2676: Start of 'ora.ocfs.db' on 'ocfs2' succeeded
CRS-2676: Start of 'ora.ocfs.db' on 'ocfs1' succeeded
CRS-6016: Resource auto-start has completed for server ocfs1
CRS-6016: Resource auto-start has completed for server ocfs2
CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
CRS-4123: Oracle High Availability Services has been started.
[root@ocfs1:/root]# 
[root@ocfs1:/root]# cemutlo -n
test-cluster

Posted by pat98


Database 서버에서 swapping 을 줄이기 위한 노력

1. 오라클 메모리관리를  AMM -> ASMM 으로 변경

AMM(SGA_TARGET+MEMORY_TARGET)을 사용하는 경우 AMM과 HugePages를 함께 사용할 수 없으므로 ASMM으로 전환한다.

예시)
ALTER SYSTEM SET MEMORY_TARGET=0 SCOPE=SPFILE;
ALTER SYSTEM SET SGA_TARGET=8G SCOPE=SPFILE;
ALTER SYSTEM SET PGA_AGGREGATE_TARGET=4G SCOPE=SPFILE;

2. Transparent HugePages를 사용하면 실행 중에 메모리 할당 지연이 발생하므로 비활성화 작업

 

cat /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/enabled 

 

always madvise [never]

 

3. Hugepages 활성화


SGA 8G 이상 사용하면 설정 권장

1) DB Parameter 를 use_large_pages=only 로 설정

2) grep Hugepagesize /proc/meminfo
   Hugepagesize:       2048 kB

   grep "hugepage" /etc/sysctl.conf
   vm.nr_hugepages=1024

   MOS 문서 401749.1 를 참조하여 hugepages 수를 계산하여 반영

   vi /etc/sysctl.conf
   vm.nr_hugepages=51200 -> 100G 로 설정예시
   
   sysctl -p

 

4. 오라클 사용계정의 memlock 설정

 

vi /etc/security/limits.conf

oracle soft nproc 2047 
oracle hard nproc 16384 
oracle soft nofile 1024 
oracle hard nofile 65536

5. OS kernel 변경적용

vi /etc/sysctl.conf
vm.swappiness = 1  -> 낮을수록 더 많은 스왑을 피할 수 있다.
vm.min_free_kbytes = 131072 -> 128M 를 의미

sysctl -p

이 매개변수는 Linux가 예약해야 하는 "사용 가능한 메모리"의 최소 양(KB)을 지정한다. 즉, 시스템은 이 양 이하로 떨어지지 않도록 메모리를 적극적으로 해제한다.
이 값이 낮으면 커널이 메모리를 더 밀접하게 사용하고 갑작스러운 메모리 수요에 대처할 수 없어 스와핑이 발생할 수 있다.
이 값을 어느 정도 늘리면 예방적으로 메모리를 확보하고 스와핑이 발생할 가능성을 줄이는 효과가 있다.

Posted by pat98

rman 19.25 부터 바뀐 사소한 팁하나.

https://mikedietrichde.com/2025/05/21/rman-speaks-a-bit-more-to-you-since-19-25/

19.25 부터 기존과 달리 rman 접속시 명령어를 실행하면 해당 명령어가 한번 더 디스플레이(ECHO) 되고 에러발생시 Trace 화일도 생성된다..

RMAN> run 
run
2> asdf
asdf

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "identifier": expecting one of: "{"
RMAN-01008: the bad identifier was: asdf
RMAN-01007: at line 2 column 1 file: standard input
RMAN Client Diagnostic Trace file : /u01/app/oracle/diag/clients/user_oracle/RMAN_393717041_110/trace/ora_rman_63173_0.trc

이는 Bug 가 아니며 잘못된 RMAN 명령어 작성시 메모리 내에 추적을 생성하고 디스크로 플러싱 하기 위한 의도적인 것이라고 한다. <--- 로그 분석을 원활하게 하기 위함..(Trace 화일은 30일 동안 보존되고 자동으로 삭제된다고 한다.)

명령어가 한번더 보이는게 싫고 이전 방식대로 사용하고 싶다면 명령어 사용전에
RMAN> set echo off

하고 진행하면 된다. 19.25 부터 ECHO 가 ON 으로 바뀌어서 OFF 로 바꾸는 것은 권장하지 않는다고 한다.

또한 Trace 화일 생기는 것은 없앨 수 없다고 한다.

Posted by pat98

Starting DBRU 19.27 and 23.8 Small Pages Are Not Allowed for RDBMS SGA In Exadata. (Doc ID 3081878.1)

 

(단 일반 시스템은 아니고 Exadata 만 해당된다)

 

바뀐 이유 : 

SGA를 위해 작은 페이지를 사용하면 VM(데이터베이스 인스턴스가 실행 중인) 내부와 하이퍼바이저에 페이지 테이블과 RDMA 리소스 메모리 블롯이 생성된다. 이는 DB 노드에 불안정을 초래하고 해당 DB 노드의 모든 인스턴스에 문제를 일으킬 수 있다.

 

기존 Small Pages 를 사용할 경우 설정값에 따라 alertlog에 아래와 같이 Error 발생함.

 

2025-05-19T10:44:27.233650+09:00
Instance shutdown complete (OS id: 274904)
2025-05-19T10:44:36.634051+09:00
Starting ORACLE instance (normal) (OS id: 283360)
2025-05-19T10:44:36.645269+09:00
ERROR: use_large_pages = TRUE is not a supported setting for database on Exadata
2025-05-19T10:44:36.645326+09:00
       : suggested values are AUTO_ONLY or ONLY

 

기본 리눅스 Memory Page s기본값 : 4k

Exadata Memory Page s기본값 : 2048K

 

메모리 블롯 (bloat)은 프로그램이 의도한 작업을 실행하는 데 필요한 것보다 더 많은 메모리를 사용하는 상황을 말함.
일반적으로 메모리 최적화 불량, 과도한 데이터 캐싱 또는 중복 객체의 축적으로 인해 발생하는데 이는 결과적으로 프로그램의 메모리 사용량이 증가하여 성능 저하 및 잠재적인 속도 저하로 이어진다.

 

Posted by pat98

Database Generating Large Amount Of Redo After Applying Jan 2025 DBRU (37260974) (Doc ID 3073478.1)

 

19.26 (2025년 1월) 패치를 적용하고 난 후 부터 이전과 달리 redolog 발생량이 급격하게 증가하는 문제 발생

 

- 버그는 아니며 19.26 부터 DB_LOST_WRITE_PROTECT 값이 AUTO 로 셋팅되면서 발생하는 문제임.

 

기존과 같이 NONE 으로 관리하려면 아래와 같이 조치해준다.

(재기동 필요없음. 현재 세션부터 영향받음)

 

SQL> alter system set db_lost_write_protect='NONE';

 

특히 dataguard 를 운영하는 환경에서는 고민이 필요한 값이 되겠다.

 

 

 

Posted by pat98

Exadata Server는 password 및 authentication policy 의 변경 및 기타 보안 설정을 위해 host_access_control tool 을 이용할 것을 권장하고 있다.

 

Exadata Database Machine Security Guide for Oracle Exadata - https://docs.oracle.com/en/engineered-systems/exadata-databasemachine/dbmsq/managing-password-and-authentication-policies.html
. . .
3.4 Managing Password and Authentication Policies
Each Oracle Exadata server contains the host_access_control utility (/opt/oracle.cellos/host_access_control), which provides simple interfaces to view and modify the password and authentication policies.
Oracle recommends using the host_access_control utility to view and modify the password and authentication policies. You may perform customizations outside the scope of the host_access_control utility at your own cost and risk.

=========================================================================  

[root@db01 oracle.cellos]# ./host_access_control 
Usage: [-q|--quiet] command [argument]
     command is one of:
     access           - User access from hosts, networks, etc.
     access-ilomweb   - Control overall access from the ILOM Web Remote Console device (tty1)
     access-export    - Export access rules to a file
     access-import    - Import access rules via a supplied file
     account-disable  - Account disable days after password expiration
     apply-defaults   - Apply either secure or factory defaults for some settings
     audit-rules      - Import audit rules via a supplied file
     auditd-options   - Options for auditd
     banner           - Login banner management
     fips-mode        - Kernel FIPS mode control
     grub-password    - GRUB password control
     idle-timeout     - Shell and SSH client idle timeout control
     ilom-configure   - ILOM settings control
     ilom-password    - ILOM root user password control
     kernel-dump      - kdump (kernel dump file creation) control
     maint-password   - Diagnostic ISO shell and Rescue password control
     nfs-server       - Control the nfs-server and rpcbind services and sockets
     pam-auth         - PAM authentication settings: pam_faillock deny and unlock_time, password strength, and password history values
     password-aging   - Adjust current users' password aging
     password-policy  - Adjust the system's password age policies
     rootssh          - Root user SSH access control
     selinux          - Configuration for SELinux
     session-limit    - Limit the number of allowed concurrent sessions
     ssh-access       - Allow or deny user and group SSH access
     sshciphers       - SSH cipher support control
     ssh-hostkeys     - SSH server HostKey control
     ssh-kexalgos     - SSHD server KexAlgorithms
     ssh-listen       - Control the SSHD service optional ListenAddress entries
     ssh-macs         - SSH supported MACs
     ssh-maxsessions  - SSH MaxSessions control
     ssh-moduli       - Trim out short SSH moduli
     ssh-pwauth       - Control the sshd PawwordAuthentication setting
     ssh-service      - Control the SSHD service and active connections
     ssh-x11forward   - Control the SSHD X11Forwarding setting
     sudo             - User privilege control through sudo
     sudodeny         - Manage the Exadata sudo users deny list
     capture-service  - Maintenance command: capture the configured state of the given service, storing the setting in persistent storage.
     get-runtime      - Maintenance command: import system configuration settings, storing them in host_access_control parameter settings files.
     restore          - Maintenance command: reapply settings previously set by this utility, as in after an upgrade
     (command help by using --help after command (no help with restore command))
     The optional -q|--quiet option is used for silent/noprompting for use with cellcli and must be the first arg.

 

=========================================================================  

간단하게만 나와서 무식하게 Exadata 의 내부 접근관리 Tool 인 host_access_control  의 세부옵션에 대해 하나씩 다 확인해 봄.
=========================================================================  
[root@db01 oracle.cellos]# ./host_access_control access
usage: host_access_control [-h] [-s] [-a] [-r] [-u username] [-o list]
                           [--close] [--open]

User/Host Access Control

optional arguments:
  -h, --help            show this help message and exit
  -s, --status          Display current access rules
  -a, --add             Add (or replace) an allow rule for a user at origins
  -r, --remove          Remove an allow rule for a user
  -u username, --user username
                        user for access. Must be a valid username to the local
                        system
  -o list, --origins list
                        Comma separated list (no spaces) of origins for access
                        from. hostnames, networks, domains, etc. ALL for
                        unrestricted. Console and ILOM devices (ttyS0, tty1)
                        already included. Valid IPV4 and IPV6 host and network
                        formats are supported Examples: IPV4 host ip addr:
                        10.100.200.3 IPV4 network-cidr: 10.0.0.0/8 IPV4
                        network-bitmask: 10.0.0.0/255.0.0.0 IPV6 host ip addr:
                        fe80::0202:b3ff:fe1e:8329 IPV6 network addr:
                        2001:cdba:9abc::5678 IPV6 network-cidr:
                        2001:db8:a0b:12f0::1/64 hostname: foo.bar.org dns
                        domain: .foo.bar.org (See access.conf manpage)
  --close               Set or reset all access rules to a mostly closed
                        access ruleset
  --open                Set or reset all access rules to an open access
                        ruleset

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control access-ilomweb
usage: host_access_control [-h] [-s] [-l] [-u]

ILOM Web Console Access Control

optional arguments:
  -h, --help    show this help message and exit
  -s, --status  Disable ILOM Web console access
  -l, --lock    Disable ILOM Web console access
  -u, --unlock  Do not disable the ILOM Web Console access

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control access-export
usage: host_access_control [-h] [-f EXPORT_FILE]

Export Exadata Host Access Rules to a file.

optional arguments:
  -h, --help            show this help message and exit
  -f EXPORT_FILE, --file EXPORT_FILE
                        Export Exadata Host Access Rules to the specified
                        file. (Specify the full, absolute file path)

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control access-import
usage: host_access_control [-h] [-f IMPORT_FILE]

Import a file into the Exadata Host Access Rules.

optional arguments:
  -h, --help            show this help message and exit
  -f IMPORT_FILE, --file IMPORT_FILE
                        Import the given file into Exadata Host Access Rules.
                        (Specify the full, absolute file path)

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control account-disable
usage: host_access_control [-h] [-d DAYS] [--defaults] [--secdefaults] [-s]

Description - Inactive Account Disable Days Control:
              Sets or gets the INACTIVE parameter in /etc/default/useradd,
              which is the number of days after a password expires until
              the account is permanently disabled. A value of 0 (**)
              disables the account as soon as the password has expired,
              and a value of -1 disables the feature.
              (**Exadata secure default)

optional arguments:
  -h, --help            show this help message and exit
  -d DAYS, --days DAYS  The number of days before expiring an account. Input
                        limited to -1 or from 0 to 36500, -1 disables, 0
                        disables immediately.
  --defaults            Set useradd INACTIVE parameter to 35, *Exadata factory
                        default value
  --secdefaults         Set useradd INACTIVE parameter to **Exadata secure
                        default value
  -s, --status          Display current INACTIVE parameter setting

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control apply-defaults
usage: host_access_control [-h] [--strict_compliance_only] [--defaults]
                           [--status] [--info]

Apply secure default settings for several commands

optional arguments:
  -h, --help            show this help message and exit
  --strict_compliance_only
                        apply secure defaults for each supported command
  --defaults            apply factory defaults for each supported command
  --status              get --status for each supported command
  --info                list commands supported by this control and an
                        explanation for settings applied with the apply-
                        defaults command

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control audit-rules
[2025-05-07 17:37:05 +0900] [WARNING] [IMG-SEC-0029] Command is not permitted on this system. audit-rules is not authorized.

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control auditd-options
usage: host_access_control [-h] [-p string] [-a string] [--defaults] [-s]

Auditd options control -
    This control is to set options for auditd.
    See the auditd.conf (5) manpage for details.
    The "exec" action must be followed by a /path-to-script enclosed in quotes:
    "exec /usr/local/bin/script"
    The script must exist or auditd service will fail to start.
    --space_left_action and --admin_space_left_action options may be combined
    A reboot is required to effect this change.

optional arguments:
  -h, --help            show this help message and exit
  -p string, --space_left_action string
                        set the action for space_left_action, ignore, syslog,
                        rotate, email, exec, suspend, single, halt.
  -a string, --admin_space_left_action string
                        set the action for admin_space_left_action, ignore,
                        syslog, rotate, email, exec, suspend, single, halt.
  --defaults            Set auditd options to Exadata default values:
                        --space_left_action EMAIL --admin_space_left_action
                        SUSPEND
  -s, --status          Display the current settings for this control.

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control banner
usage: host_access_control [-h] [-f IMPORT_FILE] [-r] [-s]

Import or Remove a login banner.

optional arguments:
  -h, --help            show this help message and exit
  -f IMPORT_FILE, --file IMPORT_FILE
                        Will import the given file into: /etc/issue,
                        /etc/issue.net, and /etc/motd (Specify the absolute
                        file path)
  -r, --remove          Remove the current login banner (if any)
  -s, --status          Display current login banner (if any)

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control fips-mode
usage: host_access_control [-h] [-e] [-d] [-s] [--info]

kernel FIPS mode control -
    NOTE:
    FOR SSH/SSHD FIPS compliance,
    run the "host_access_controlsh-macs --secdefaults" command

optional arguments:
  -h, --help     show this help message and exit
  -e, --enable   enable kernel FIPS mode
  -d, --disable  disable kernel FIPS mode
  -s, --status   display the current kernel FIPS mode
  --info         information regarding enabling kernel FIPS mode

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control grub-password
New GRUB password: 
[2025-05-07 17:38:13 +0900] [WARNING] [IMG-SEC-002F] Program exit from KeyboardInterrupt 

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control idle-timeout
usage: host_access_control [-h] [-c CLIENT] [-i CLIENTALIVEINTERVAL]
                           [-m CLIENTALIVECOUNTMAX] [-l SHELL]
                           [-t STOPIDLESESSIONSEC] [--defaults] [-s]

Idle Timeout Settings Control

optional arguments:
  -h, --help            show this help message and exit
  -c CLIENT, --client CLIENT
                        SSH client idle timeout. Option retained for backwards
                        compatibility. Number of seconds of inactivity on an
                        ssh connection before the connection is terminated.
                        Sets ClientAliveCountMax to 1 and ClientAliveInterval
                        to the given --client value. Input is limited from 0
                        to 31557600 (one year) (*Exadata factory default is
                        600 (10m))
  -i CLIENTALIVEINTERVAL, --clientaliveinterval CLIENTALIVEINTERVAL
                        ClientAliveInterval, SSH client idle timeout. Number
                        of seconds of inactivity before a message is sent to
                        request a response from the client. Input is limited
                        from 0 (disabled) to 31557600 (one year) (*Exadata
                        factory default is 600 (10m))
  -m CLIENTALIVECOUNTMAX, --clientalivecountmax CLIENTALIVECOUNTMAX
                        ClientAliveCountMax, SSH client idle timeout. The
                        number of client alive messages which may be sent
                        without sshd receiving any messages back from the
                        client. Input is limited from 0 to 100000 (*Exadata
                        factory default is 1)
  -l SHELL, --shell SHELL
                        Shell idle timeout. Number of seconds of no input
                        before the shell will terminate. Input is limited to 0
                        or from 300 to 31557600 (one year) (*Exadata factory
                        default is 14400 (4h))
  -t STOPIDLESESSIONSEC, --stopidlesessionsec STOPIDLESESSIONSEC
                        systemd-logind StopIdleSessionSec. Number of seconds
                        of idle time before a session is terminated. Input is
                        limited to the word infinity, or from 60 to 9999999
                        (*Exadata factory default is infinity)
  --defaults            Set all idle-timeout values to *Exadata factory
                        defaults
  -s, --status          Display current idle timeout settings

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control ilom-configure
usage: host_access_control [-h] [--get GET] [--set SET [SET ...]]

ILOM configuration controls.

optional arguments:
  -h, --help           show this help message and exit
  --get GET            Show a supported ILOM parameter value.
  --set SET [SET ...]  Set a supported ILOM parameter value.

Supported ILOM parameters:
    cli-timeout [argument] (int), value in minutes from 0 to 1440
                  
=========================================================================
[root@db01 oracle.cellos]# ./host_access_control ilom-password
New ILOM root user password: 
[2025-05-07 17:39:08 +0900] [WARNING] [IMG-SEC-002F] Program exit from KeyboardInterrupt 

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control kernel-dump
[2025-05-07 17:39:30 +0900] [WARNING] [IMG-SEC-0029] Command is not permitted on this system. kernel-dump is not authorized.

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control maint-password
usage: host_access_control [-h] [-d] [-r] [-p PW_VARIABLE] [--reset]

Set or update the diagnostic shell or rescue password.

optional arguments:
  -h, --help            show this help message and exit
  -d, --diag            Set or update the Diagnostic Shell password
  -r, --rescue          Set or update the Rescue password
  -p PW_VARIABLE, --pass PW_VARIABLE
                        Optionally supply a password (via a variable). (export
                        EXADATA_RESCUE_PASSWORD='password') Specify the
                        variable name only, no $ (--pass
                        EXADATA_RESCUE_PASSWORD). If --pass is not supplied, a
                        password input prompt will be presented. Permitted
                        passwords are 8-16 alphanumeric characters
  --reset               Reset the Diagnostic Shell and Rescue passwords to
                        Factory Defaults

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control nfs-server
usage: host_access_control [-h] [-e] [-d] [-s]

Description - Enable or disable the NFS Server services. This command will
operate on each of the following units: nfs-server.service, rpcbind.service,
rpcbind.socket. Besides enabling or disabling the units it will unmask and
mask the units. Masking of the NFS Server units is a security precaution.

optional arguments:
  -h, --help     show this help message and exit
  -e, --enable   Enable/Unmask NFS Server services and socket
  -d, --disable  Disable/Mask NFS Server services and socket
  -s, --status   Current NFS Server services and socket setting

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control pam-auth
usage: host_access_control [-h] [-d DENY] [-i INTERVAL] [-l UNLOCK_TIME]
                           [-p list] [-q PWQUALITY] [-r REMEMBER] [-e ENFORCE]
                           [--defaults] [--secdefaults] [-s]

PAM Authentication Settings Control

optional arguments:
  -h, --help            show this help message and exit
  -d DENY, --deny DENY  Number of consecutive failed login attempts
                        within {interval} before an account will be locked.
                        Input is limited to from 1 to 10.
                        This is the pam_faillock deny parameter.
                        *Exadata factory default is 3 
  -i INTERVAL, --interval INTERVAL
                        The number of seconds during which the
                        consecutive authentication failures must happen for the user account to be
                        locked out.
                        ***Note: Setting to 0 disables LOCKING.
                        This is the pam_faillock fail_interval parameter.
                        *Exadata factory default is 900 (15 minutes) 
  -l UNLOCK_TIME, --lock UNLOCK_TIME
                        Number of seconds (integer) an account will be
                        locked due to {deny} failed login attempts within {interval}.
                        Input is limited to from 0 to 31557600 (one year).
                        ***Note: Setting to 0 disables LOCKING by setting
                        interval to 0. This is for compatibility with the
                        older pam_tally2 method and this control.
                        This is the pam_faillock unlock_time parameter
                        *Exadata factory default is 900 (15m)
                                              
  -p list, --passwdqc list
                        FOR SYSTEMS RUNNING ON LESS THAN OL7
                        Comma separated set of 5 values: N0,N1,N2,N3,N4
                        defining the minimum allowed length for different
                        types of password/passphrases. Each subsequent number
                        is required to be no larger than the preceding one
                        The keyword "disabled" can be used to disallow
                        passwords of a given kind regardless of their length.
                        Passwords must use three character classes. Character
                        classes for passwords are digits, lowercase letters,
                        uppercase letters, and other characters. Minimum
                        password length is 12 characters when using three
                        character classes. Minimum password length is 8
                        characters when using four character classes.
                        *Exadata factory default is 5,5,5,5,5
                        **Exadata secure default is disabled,disabled,16,12,8
                        (refer to the pam_passwdqc manpage for details)
                                              
  -q PWQUALITY, --pwquality PWQUALITY
                        FOR SYSTEMS RUNNING ON OL7 AND GREATER
                        1. EITHER A SINGLE Integer, ranging from 6 to 40,
                        defining the minimum allowed password length. Other
                        values are defaulted as noted below by the Exadata
                        defaults.
                        All classes will be required for password changes as
                        well as other checks enforced for lengths >7. For
                        lengths <8, class requirements are not used.
                        *Exadata factory default is:
                        minlen=8 dcredit=-1 ucredit=-1 lcredit=-1 ocredit=-1
                        difok=8 maxrepeat=3 maxclassrepeat=4
                        **Exadata secure default is:
                        minlen=15 dcredit=-1 ucredit=-1 lcredit=-1 ocredit=-1
                        difok=8 maxrepeat=3 maxclassrepeat=4
                        2. OR A COMMA SEPARATED LIST, representing values for:
                        minlen dcredit ucredit lcredit ocredit difok maxrepeat
                        maxclassrepeat minclass maxsequence gecoscheck
                        That is an 11 integer, comma separated list.
                        To set a default value for an option, use -8888. That
                        option will not be set.
                        Example: 40,-1,-1,-1,-1,8,3,4,0,-8888,-8888
                        Example: 8,-1,-1,-1,-1,8,3,4,0,0,0
                        Example: 15,-1,-1,-1,-1,8,3,4,0,0,0
                        (refer to the pam_pwquality manpage for details)
                                              
  -r REMEMBER, --remember REMEMBER
                        The last n passwords to remember for password
                        change history.
                        Valid range is an integer from 0 to 1000.
                        *Exadata factory default is 5
                                                     
  -e ENFORCE, --enforce ENFORCE
                        Enforce for the root account the password
                        history and password quality settings.
                        "set" to add the enforce_for_root option.
                        "unset" to remove the enforce_for_root option.
                        This setting is NOT an Exadata default or secure default.
  --defaults            Set all pam-auth values to *Exadata factory defaults
  --secdefaults         Set all pam-auth values to **Exadata secure defaults
  -s, --status          Display current PAM authentication settings

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control password-aging
usage: host_access_control [-h] [-s] [-u USER] [--defaults] [--secdefaults]
                           [--policy] [-M int] [-m int] [-W int]

Description - Password Aging Control:
     Sets or displays the current password aging for interactive user accounts.
     For defining the password aging policy (used for account creation) use the
     password-policy command.

optional arguments:
  -h, --help            show this help message and exit
  -s, --status          Display current user password aging
  -u USER, --user USER  A valid interactive user's username
  --defaults            Set all password-aging values to *Exadata factory
                        defaults for all interactive users
  --secdefaults         Set all password-aging values to **Exadata secure
                        defaults for all interactive users
  --policy              Set all password-aging values to the aging policy as
                        defind by the password-policy command (or
                        /etc/login.defs) for all interactive users
  -M int, --maxdays int
                        Maximum number of days a password may be used. Input
                        limited to from 1 to 99999.
  -m int, --mindays int
                        Minimum number of days allowed between password
                        changes. Input limited to from 0 to 99999, 0 for
                        anytime.
  -W int, --warndays int
                        Number of days warning given before a password
                        expires. Input limited to from 0 to 99999.

        Any option but --defaults, --secdefaults, and --status may be combined.
       ( *Exadata factory default values)
       (**Exadata secure default values)

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control password-policy
usage: host_access_control [-h] [-s] [--defaults]
                           [--PASS_MAX_DAYS PASS_MAX_DAYS]
                           [--PASS_MIN_DAYS PASS_MIN_DAYS]
                           [--PASS_MIN_LEN PASS_MIN_LEN]
                           [--PASS_WARN_AGE PASS_WARN_AGE]

Description - Password Aging Policy Control:
     Defines and displays the password aging policies for new account creation.
     For active passord aging use the password-aging command.

optional arguments:
  -h, --help            show this help message and exit
  -s, --status          Display current password age settings
  --defaults            Set all password-policy values to *Exadata factory
                        defaults
  --PASS_MAX_DAYS PASS_MAX_DAYS
                        Maximum number of days a password may be used. Input
                        limited to -1 or from 1 to 36500, -1 disables.
  --PASS_MIN_DAYS PASS_MIN_DAYS
                        Minimum number of days allowed between password
                        changes. Input limited to -1 or from 1 to 36500, -1
                        disables.
  --PASS_MIN_LEN PASS_MIN_LEN
                        Minimum acceptable password length. Input limited to
                        from 8 to 30.
  --PASS_WARN_AGE PASS_WARN_AGE
                        Number of days warning given before a password
                        expires. Input limited to -1 or from 0 to 90. -1
                        disables.

Any option but --defaults and --status may be combined.
             (*Exadata factory default values)

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control rootssh
usage: host_access_control [-h] [-l] [-u] [-k] [--defaults] [--secdefaults]
                           [-s]

SSH PermitRootLogin Control

optional arguments:
  -h, --help     show this help message and exit
  -l, --lock     Disable root SSH access (**Exadata secure default)
  -u, --unlock   Enable root SSH access (*Exadata factory default)
  -k, --key      Enable root SSH access, but disable password authentication
                 for root (keys allowed)
  --defaults     Set value for root ssh access to *Exadata factory default
  --secdefaults  Set value for root ssh access to **Exadata secure default
  -s, --status   current root SSH access

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control selinux
usage: host_access_control [-h] [-e] [-p] [-d] [-r] [-c] [-s]

SELinux configured state control

optional arguments:
  -h, --help        show this help message and exit
  -e, --enforcing   set the SELinux state to enforcing
  -p, --permissive  set the SELinux state to permissive
  -d, --disabled    set the SELinux state to disabled
  -r, --relabel     Relabel filesystems online. A reboot is not required
  -c, --config      Display the configured SELinux state
  -s, --status      Display the current SELinux status

This control is to set the desired SELinux state.
See the selinux(8) manpage for details.
A reboot is required to effect changes.
[root@db01 oracle.cellos]# ./host_access_control session-limit
usage: host_access_control [-h] [-l LIMIT] [--defaults] [--secdefaults] [-s]

Description - Session Limits (maxlogins) Control:
    Sets or gets the '* hard maxlogins' parameter in /etc/security/limits.conf,
    which is the maximum number of logins for all users,
    (this limit does not apply to user with uid=0)
    ( *Exadata CELL factory default, 10)
    ( *Exadata DB factory default, 1000)
    (**Exadata secure default, 10)

optional arguments:
  -h, --help            show this help message and exit
  -l LIMIT, --limit LIMIT
                        The number of allowed concurrent login sessions. Input
                        limited to -1 (no limit) or from 0 to 10000.
  --defaults            Set maxlogins parameter to *Exadata factory default
                        value
  --secdefaults         Set maxlogins parameter to **Exadata secure default
                        value
  -s, --status          Display current maxlogins parameter setting

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control ssh-access
usage: host_access_control [-h] [-a] [-d] [-u USER] [-g GROUP] [-e] [-s]

Description:
       Adds allow or deny rules to the SSH server configuration.
       The --erase option REMOVES all access rules. --allow or --deny
       OVERWRITES existing rules.
       NOTE: No option will disturb Match Blocks.
       See sshd_config(5) for more information on
       AllowUsers, DenyUsers, AllowGroups, DenyGroups

       NOTE: For controlling SSH access to the root account, use the
             `host_access_control rootssh` command

optional arguments:
  -h, --help            show this help message and exit
  -a, --allow           Allow one or more users or groups SSH access.
  -d, --deny            Deny one or more users or groups SSH access.
  -u USER, --user USER  Comma separated list of usernames (no spaces). The
                        username may be local or take the form USER@HOST. See
                        PATTERNS in ssh_config(5) for more information on
                        username patterns. NOTE: No input verification is done
                        to validate actual usernames.
  -g GROUP, --group GROUP
                        Comma separated list of groupnames (no spaces). See
                        PATTERNS in ssh_config(5) for more information on
                        groupname patterns. NOTE: No input verification is
                        done to validate actual groupnames.
  -e, --erase           Remove the configured SSH allow and deny access rules.
  -s, --status          Display the configured SSH allow or deny access rules.

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control sshciphers
usage: host_access_control [-h] [-r] [-c] [-b] [-e] [-d] [-p list]
                           [--defaults] [-s]

SSH cipher control

optional arguments:
  -h, --help            show this help message and exit
  -r, --server          Applies to the SSH server configuration
  -c, --client          Applies to the system-wide SSH client configuration
  -b, --both            Applies to both the SSH server and system-wide SSH
                        client configurations
  -e, --enable          Enable support for the given cipher list
  -d, --disable         Disable support for the given cipher list
  -p list, --ciphers list
                        Comma-separated list (no spaces) of ciphers the action
                        applies to. Must be one or more of:
                        aes256-ctr,aes192-ctr,aes128-ctr
  --defaults            Apply the *Exadata factory default configuration for
                        this control
  -s, --status          Display the current SSH Cipher settings

 *Exadata factory default:    aes256-ctr,aes192-ctr,aes128-ctr
                              for both server and client
  Example:
     sshciphers --server --disable --ciphers aes128-ctr
     sshciphers --both --disable --ciphers aes128-ctr,aes192-ctr,aes256-ctr
              
=========================================================================
[root@db01 oracle.cellos]# ./host_access_control ssh-hostkeys
usage: host_access_control [-h] [-a] [-r] [-k list] [--defaults] [-s]

SSH HostKeys control

optional arguments:
  -h, --help            show this help message and exit
  -a, --add             Add given HostKey entries to the SSHD configuration
  -r, --remove          Remove given HostKey entries from the SSHD
                        configuration
  -k list, --hostkeys list
                        Comma-separated list (no spaces) of HostKeys files the
                        action applies to.
  --defaults            Apply the *Exadata default configuration for this
                        control
  -s, --status          Display the current SSH HostKey entries

 *Exadata default:      /etc/ssh/ssh_host_rsa_key,/etc/ssh/ssh_host_ecdsa_key
  Example:
    ssh-hostkeys --remove --hostkeys /etc/ssh/ssh_host_rsa_key
    ssh-hostkeys --add --hostkeys \
      /etc/ssh/ssh_host_ecdsa_key,/etc/ssh/ssh_host_rsa_key
             
=========================================================================
[root@db01 oracle.cellos]# ./host_access_control ssh-kexalgos
usage: host_access_control [-h] [-e] [-d] [-k list] [--defaults] [-s] [--info]

SSHD KexAlgorithms control

optional arguments:
  -h, --help            show this help message and exit
  -e, --enable          Enable support for the given KexAlgorithm list
  -d, --disable         Disable support for the given KexAlgorithm list
  -k list, --kexalgos list
                        Comma-separated list (no spaces) of KexAlgorithms the
                        action applies to. Supprted KexAlgorithms are shown
                        with the --info option.
  --defaults            Apply the *Exadata default configuration for this
                        control
  -s, --status          Display the current SSH KexAlgorithms settings
  --info                Display the supported KexAlgorithms by the SSH Server

  *Exadata default:          
diffie-hellman-group14-sha256
diffie-hellman-group16-sha512
diffie-hellman-group18-sha512
diffie-hellman-group-exchange-sha256
ecdh-sha2-nistp256
ecdh-sha2-nistp384
ecdh-sha2-nistp521

  Example:
    ssh-kexalgos --disable --kexalgos ecdh-sha2-nistp521
    ssh-kexalgos --enable --kexalgos
    diffie-hellman-group14-sha256,diffie-hellman-group16-sha512

=========================================================================              
[root@db01 oracle.cellos]# ./host_access_control ssh-listen
usage: host_access_control [-h] [-a] [-r] [--ipaddr list] [-s]

ssh-listen control

optional arguments:
  -h, --help     show this help message and exit
  -a, --add      Add given IPv4 or IPv6 address(es) to the sshd_config
                 optional ListenAddress entries
  -r, --remove   Remove given IPv4 or IPv6 address(es) from the sshd_config
                 optional ListenAddress entries
  --ipaddr list  Specify one or more comma separated IPv4 or IPv6 addresses
                 example: 10.100.200.3,192.168.220.12,2001:cdba:9abc::5678
  -s, --status   Configured sshd_config ListenAddress entries

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control ssh-macs
usage: host_access_control [-h] [-r] [-c] [-b] [-e] [-d] [-m list]
                           [--defaults] [--secdefaults] [-s] [--info]

SSH MACs control

optional arguments:
  -h, --help            show this help message and exit
  -r, --server          Applies to the SSH server configuration
  -c, --client          Applies to the system-wide SSH client configuration
  -b, --both            Applies to both the SSH server and system-wide SSH
                        client configurations
  -e, --enable          Enable support for the given MAC list
  -d, --disable         Disable support for the given MAC list
  -m list, --macs list  Comma-separated list (no spaces) of MACs the action
                        applies to. Supprted MACs are shown with the --info
                        option.
  --defaults            Apply the *Exadata default configuration for this
                        control
  --secdefaults         Apply the **Exadata secure default configuration for
                        this control
  -s, --status          Display the current SSH MACs settings
  --info                Display the supported MACs by the SSH Server

 *Exadata default:         hmac-sha2-512,hmac-sha2-256,hmac-sha1 for both server and client
**Exadata secure default:  hmac-sha2-512,hmac-sha2-256 for both server and client
  Example:
     ssh-macs --server --disable --macs hmac-sha1
     ssh-macs --both --disable --macs hmac-sha2-512,hmac-sha2-256

=========================================================================              
[root@db01 oracle.cellos]# ./host_access_control ssh-maxsessions
usage: host_access_control [-h] [-n NUMBER] [--defaults] [-s]

SSHD MaxSessions Control

optional arguments:
  -h, --help            show this help message and exit
  -n NUMBER, --number NUMBER
                        MaxSessions. The maximum number of open sessions
                        permitted per network connection. The Exadata default
                        is 10.
  --defaults            Set value for SSH maximum sessions to the Exadata
                        factory default
  -s, --status          Show the current SSH maximum sessions setting

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control ssh-moduli
usage: host_access_control [-h] [-t] [-s]

SSHD moduli trim control

optional arguments:
  -h, --help    show this help message and exit
  -t, --trim    Trim out short (<2048) sshd moduli from /etc/ssh/moduli. There
                is no undo or restore from this action. A one-time original
                backup is saved to
                /etc/exadata/security/keepfiles/sshd_moduli.orig
  -s, --status  Print the status of configured short sshd moduli.

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control ssh-pwauth
usage: host_access_control [-h] [-d] [-e] [--defaults] [-s]

SSHD PasswordAuthentication Control

optional arguments:
  -h, --help     show this help message and exit
  -d, --disable  Disable SSH password authenticated access
  -e, --enable   Enable SSH password authenticated access (*Exadata factory
                 default)
  --defaults     Set value for SSH password authenticated access to the
                 *Exadata factory default
  -s, --status   Show the current SSH password authenticated access setting

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control ssh-service
usage: host_access_control [-h] [-e] [-d] [-k] [-s]

SSH service control

optional arguments:
  -h, --help          show this help message and exit
  -e, --enable        Enable SSH service (*Exadata default)
  -d, --disable       Disable SSH service
  -k, --disable-kill  Disable SSH service AND terminate all active sessions
  -s, --status        Current SSH service setting

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control ssh-x11forward
usage: host_access_control [-h] [-d] [-e] [--defaults] [-s]

SSH X11Forwarding Control

optional arguments:
  -h, --help     show this help message and exit
  -d, --disable  disable SSHD X11Forwarding (*Exadata factory default)
  -e, --enable   enable SSHD X11Forwarding
  --defaults     Set value for X11Forward to *Exadata factory default
  -s, --status   current SSH X11Forward setting

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control sudo
usage: host_access_control [-h] [-a] [-r] [-u username] [-t username] [-n]
                           [-s]

sudoers rules control

optional arguments:
  -h, --help            show this help message and exit
  -a, --add             Add a sudo rule for user to privilege escalate to
                        t(arget)user
  -r, --remove          Remove sudo rule(s) for user (if no --tuser specified
                        then all rules for --user will be removed)
  -u username, --user username
                        Source user for privilege escalation. User will be
                        created if not found.
  -t username, --tuser username
                        Target user to privilege escalate to. Must be a valid
                        username to the local system.
  -n, --nopasswd        Add the NOPASSWD: option to added rule.
  -s, --status          Display sudo rules for user

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control sudodeny
usage: host_access_control [-h] [-a] [-r] [-s] [-u list]

sudo users deny list control

optional arguments:
  -h, --help            show this help message and exit
  -a, --add             Add one or more usernames to the sudoer users deny
                        list
  -r, --remove          Remove one or more usernames from the sudoer users
                        deny list
  -s, --status          Display if one or more usernames are on the sudo user
                        deny list
  -u list, --user list  Comma separated list of usernames (no spaces). The
                        usernames need not be existing users on the system.

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control capture-service
usage: host_access_control [-h] [--service SYSTEM_SERVICE]

capture-service control

optional arguments:
  -h, --help            show this help message and exit
  --service SYSTEM_SERVICE
                        Capture the given service configured state for use
                        with the restore command. (only .service units are
                        supported for systemd)

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control get-runtime
[2025-05-07 17:48:10 +0900] [INFO] [IMG-SEC-0043] Get runtime complete 

=========================================================================
[root@db01 oracle.cellos]# ./host_access_control restore
[2025-05-07 17:49:18 +0900] [INFO] [IMG-SEC-0003] Restore complete

Posted by pat98

07-30 06:04
Flag Counter
Yesterday
Today
Total

글 보관함

최근에 올라온 글

달력

 « |  » 2025.7
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

최근에 달린 댓글