Database초보우낙
오라클 엑사 데이터 주요 명령어 3 본문
omponent | Processes 오라클 프로세서 |
Owner OS유저 (소유자가 누구인지) |
Cluster Ready Service(CRS) | crsd | root |
Cluster Synchronization Service (CSS) | ocssd, cssdmonitor, cssdagent |
grid owner, root, root |
Event Manager(EVM) | evmd, evmlogger | grid owner |
Cluster Time Synchironization Service (CTSS) (서로 시간이 맞는지 확인) |
octssd | root |
Oracle Notification Service (ONS) | ons,eons | grid owner |
Oracle Agent | oraagent | grid owner |
Grid Naming Service(GNS) | gnsd | root |
Grid Plug and Play (GPnP) | gpnpd | grid owner |
Multicast domain name service (mDNS) | mdnsd | grid owner |
💡Oracle Clusterware 구동 5.2.1 Oracle Clusterware 시작 / 종료
CRSCTL 유틸리티를 사용하여 Oracle Clusterware를 관리합니다. Oracle 고가용성 서비스 데몬(OHASD)이 모든 클러스터 노드에서 실행되는 경우, 모든 노드에서 다음 명령을 실행하여 클러스터 노드의 모든 Oracle Clusterware 스택(Oracle Clusterware 의해 관리되는 프로세스와 리소스)를 시작할 수 있습니다.
한 노드에서 OHASD를 포함한 모든 Oracle Clusterware 시작
클러스터가 안올라왔을 때 수동으로 클러스터를 시작시키는 명령어
1번노드와 2번노드에서 각각 수행한다.
<1번 노드와 2번노드에서 각각 실행하기>
방법1
$ crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
방법2.
crsctl start cluster -n 노드명
방법3.
crsctl start cluster -all
클러스터의 모든 노드에서 Oracle Clusterware를 중지하려면 노드에서 다음 명령을 실행합니다. 명령에서 중단되는 것은 Oracle Clusterware 의해 관리되는 리소스 Oracle ASM 인스턴스 및 모든 Oracle Clusterware 프로세스(OHASD 및 종속 프로세스 제외)입니다.
클러스터 상의 모든 노드의 Oracle Clusterware 종료
crsctl stop cluster –all
$ crsctl stop cluster –all ( or $ crsctl stop cluster -n KRXA01 KRXA02 )
CRS-2673: Attempting to stop 'ora.crsd' on 'KRXA01'
CRS-2673: Attempting to stop 'ora.crsd' on 'KRXA02'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'KRXA01'
CRS-2673: Attempting to stop 'ora.DBFS_DG.dg' on 'KRXA01'
CRS-2673: Attempting to stop 'ora.KRXA.db' on 'KRXA01'
--중략--
CRS-2677: Stop of 'ora.ctssd' on 'KRXA02' succeeded
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'KRXA01' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'KRXA01'
CRS-2677: Stop of 'ora.cssd' on 'KRXA01' succeeded
CRS-2673: Attempting to stop 'ora.diskmon' on 'KRXA01'
CRS-2677: Stop of 'ora.diskmon' on 'KRXA01' succeeded
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'KRXA02' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'KRXA02'
CRS-2677: Stop of 'ora.cssd' on 'KRXA02' succeeded
CRS-2673: Attempting to stop 'ora.diskmon' on 'KRXA02'
CRS-2677: Stop of 'ora.diskmon' on 'KRXA02' succeeded
한쪽 노드의 클러스터만 중지시키려면
crsctl stop crs
$ crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'KRXA01'
CRS-2673: Attempting to stop 'ora.crsd' on 'KRXA01'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'KRXA01'
CRS-2673: Attempting to stop 'ora.DBFS_DG.dg' on 'KRXA01'
CRS-2673: Attempting to stop 'ora.KRXAa.db' on 'KRXA01'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'KRXA01'
CRS-2673: Attempting to stop 'ora.oc4j' on 'KRXA01'
CRS-2673: Attempting to stop 'ora.cvu' on 'KRXA01'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'KRXA01'
CRS-2677: Stop of 'ora.cvu' on 'KRXA01' succeeded
--중략--
CRS-2673: Attempting to stop 'ora.gipcd' on 'KRXA01'
CRS-2673: Attempting to stop 'ora.diskmon' on 'KRXA01'
CRS-2677: Stop of 'ora.diskmon' on 'KRXA01' succeeded
CRS-2677: Stop of 'ora.gipcd' on 'KRXA01' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'KRXA01'
CRS-2677: Stop of 'ora.gpnpd' on 'KRXA01' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'KRXA01' has completed
CRS-4133: Oracle High Availability Services has been stopped.
💡Cluster의 서비스 시작/종료(특정 응용프로그램이 안올라오는 경우에 시작하는 방법)
대상 Host에 SSH로 접속 후 클라이언트 콘솔 상에서 다음과 같이 실행합니다.
§ 클러스터 서비스 시작
$ srvctl start asm -n 노드명
$ srvctl start nodeapps -n 노드명
$ srvctl start instance –d <db_unique_name> -i <인스턴스명>
§ 클러스터 서비스 종료
순서대로 진행 인스턴스 -> asm -> 노드
$ srvctl stop instance –d <db_unique_name> -i <인스턴스명>
$ srvctl stop asm -n 노드명
$ srvctl stop nodeapps -n 노드명
RAC의 응용프로그램을 올릴때 순서 : ASM -> Nodeapp -> instance
RAC의 응응프로그램을 내릴때 순서 : instance -> ASM -> Nodeapp
💡 CRS autostart 설정 확인 및 변경
os가 켜졌을 때 클러스터가 자동으로 올라오게 하려면?
crsctl config crs
CRS를 자동을 시작하게 설정하는 방법은 root 계정으로 아래와 같이 수행합니다.
§ autostart 설정 여부 확인
root@KRXA01:/root# crsctl config crs
CRS-4622: Oracle High Availability Services autostart is enabled.
os가 켜졌을 때 클러스터가 자동으로 올라오지 못하게 하려면?
crsctl disable crs
root@KRXA01:/root# crsctl disable crs
CRS-4621: Oracle High Availability Services autostart is disabled.
전체 클러스터의 상태 확인
crsctl check cluster -all
$ crsctl check cluster –all
**************************************************************
KRXA01:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
KRXA02:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
노드별 clusterware stack 상태 확인
crsctl check cluster -n KRXA01
CRS , CSS , EVM 프로세스가 ONLINE 상태인 경우 정상입니다.
$ crsctl check cluster -n KRXA01
**************************************************************
KRXA01:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
CRS 리소스 상태 확인
crsctl status resource -t
$ crsctl status resource -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATAC1.dg
ONLINE ONLINE krxa01
ONLINE ONLINE krxa02
ora.DBFS_DG.dg
ONLINE ONLINE krxa01
ONLINE ONLINE krxa02
ora.LISTENER.lsnr
ONLINE ONLINE krxa01
ONLINE ONLINE krxa02
ora.RECOC1.dg
ONLINE ONLINE krxa01
ONLINE ONLINE krxa02
ora.asm
ONLINE ONLINE krxa01 Started
ONLINE ONLINE krxa02 Started
ora.gsd
OFFLINE OFFLINE krxa01
OFFLINE OFFLINE krxa02
ora.net1.network
ONLINE ONLINE krxa01
ONLINE ONLINE krxa02
ora.ons
ONLINE ONLINE krxa01
ONLINE ONLINE krxa02
ora.registry.acfs
ONLINE ONLINE krxa01
ONLINE ONLINE krxa02
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE krxa01
ora.cvu
1 ONLINE ONLINE krxa01
ora.krxa.db
1 ONLINE ONLINE krxa01 Open
2 ONLINE ONLINE krxa02 Open
ora.krxa03.vip
1 ONLINE ONLINE krxa01
ora.krxa04.vip
1 ONLINE ONLINE krxa02
ora.oc4j
1 ONLINE ONLINE krxa01
ora.scan1.vip
1 ONLINE ONLINE krxa01
--------------------------------------------------------------------------------
ocr 파일의 위치를 확인하고 상태를 확인하는 명령어
cat /etc/oracle/ocr.loc
root@KRXA01:/root# cat /etc/oracle/ocr.loc
ocrconfig_loc=+DBFS_DG
local_only=FALSE
root@KRXA01:/root# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 4
Total space (kbytes) : 409568
Used space (kbytes) : 1448
Available space (kbytes) : 408120
ID : 181960156
Device/File Name : +DBFS_DG
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check bypassed due to non-privileged user
voting disk의 상태를 확인하는 명령어
crsctl query css votedisk
root@KRXA01:/root# crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE a2c98e3ecea64fd7bf42433cf372ad0f (o/192.168.10.7/DBFS_DG_CD_02_KRXAcel03) [DBFS_DG]
2. ONLINE 382df8acda974f57bf246f804f4daf07 (o/192.168.10.6/DBFS_DG_CD_02_KRXAcel02) [DBFS_DG]
3. ONLINE aa9b916f77e14fe6bf5bc0b91f71fc7e (o/192.168.10.5/DBFS_DG_CD_02_KRXAcel01) [DBFS_DG]
Located 3 voting disk(s).
💡SCAN LISTENER 상태 확인
SCAN(Single Client Access Name) 기능은 11gR2에서 추가된 기능으로 Client에서 데이터베이스 Server로 접속 시 여러개의 RAC 노드가 있더라도 하나의 Access Name을 갖도록 하는 기능입니다. Exadata는 기본적으로 SCAN기능을 설정하며, 이를 위해 SCAN Listener와 SCAN IP가 세팅됩니다. 아래는 해당 Scan Listener의 상태를 점검하는 방법입니다.
대상 Host에 SSH로 접속 후 클라이언트 콘솔 상에서 다음과 같이 실행합니다.
srvctl 명령어를 이용한 노드별 SCAN LISTENER 상태 확인
$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node KRXA01
srvctl 명령어를 이용한 노드별 LISTENER 설정 확인
$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
Registration invited nodes: # 12c feature
Registration invited subnets: # 12c feature
엑사 데이터 점검표 | ||
서버 | 명령어 | 점검결과 |
데이터 베이스 서버 | DBMCLI > list alerthistory where secerity='critical' | 정상 |
DBMCLI > list alerthistory where secerity='warning' | 정상 | |
DBMCLI > list dbserer detail | 정상 | |
DBMCLI> list metriccurrent attributes name, objectType, metricObjectName, metricValue, alertState |
정상 | |
DBMCLI> list metriccurrent attributes name, metricObjectName, metricValue, alertState where alertState!='normal' | 정상 | |
DBMCLI> list physicaldisk |
정상 | |
인피니 밴드 | DBMCLI> list ibport detail | 정상 |
스토리지 서버 | CellCLI> list alerthistory | 정상 |
CellCLI> list alerthistory 2_1 detail | 문제있음 | |
CellCLI> list cell detail | 정상 | |
CellCLI> list phsicaldisk; | 정상 | |
CellCLI> list flashlog detail |
정상 | |
데이터 베이스 노드 | $ crsctl check cluster –all | 정상 |
$ crsctl check cluster -n KRXA01 | 정상 | |
$ crsctl status resource -t | 정상 | |
# cat /etc/oracle/ocr.loc | 정상 | |
# ocrcheck | 정상 | |
# crsctl query css votedisk | 정상 | |
# srvctl status scan_listener | 정상 | |
# srvctl status scan_listener | 정상 | |
고객사 담당자 사인 |
'오라클 엑사' 카테고리의 다른 글
오라클 엑사 데이터 주요명령어 총정리4 (0) | 2024.04.15 |
---|---|
오라클 엑사 데이터 주요 명령어 총정리2 (0) | 2024.04.11 |
오라클 엑사 데이터 주요 명령어 총정리 (0) | 2024.04.08 |
오라클 엑사 이론 수업 (0) | 2024.04.08 |