'오라클 CRSCTL 명령어'에 해당되는 글 1건

  1. 2019.09.09 이중화(RAC)된 오라클의 DB 가동 명령어

이중화된 오라클의 DB 가동 명령어

# 클러스터 상태 확인 : crsctl check crs

# 클러스터에 등록된 자원 정보 확인 : crsctl stat res -t

# 오라클 기동 : crsctl start crs
- (주의)startup 등 단일 인스턴스와는 명령어가 다름

클러스터 상태 확인 후, 오라클을 기동하고, 클러스터 자원 정보를 확인!!!!
상세한 내용은 아래를 참조하시기 바랍니다.

* 서버 재구동시, 오라클 역시 자동으로 reboot되게 하려며,
crsctl disable crs * => rebooting 후 crs가 자동 시작되는 것을 disable
crsctl enable crs* => rebooting 후 crs가 자동 시작되는 것을 enable
crsctl config crs* => crs 설정 상태 확인


# 클러스터 상태 확인

crsctl check crs

vmgdb01n:/ORACLE> crsctl check crs

CRS-4638: Oracle High Availability Services is online

CRS-4537: Cluster Ready Services is online

CRS-4529: Cluster Synchronization Services is online

CRS-4533: Event Manager is online

# 클러스터에 등록된 자원 정보 확인

crsctl status res[ource] -t

vmgdb01n:/ORACLE> crsctl status resource -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE vmgdb01n
ONLINE ONLINE vmgdb02n
ora.gsd
OFFLINE OFFLINE vmgdb01n
OFFLINE OFFLINE vmgdb02n
ora.net1.network
ONLINE ONLINE vmgdb01n
ONLINE ONLINE vmgdb02n
ora.ons
ONLINE ONLINE vmgdb01n
ONLINE ONLINE vmgdb02n
ora.registry.acfs
OFFLINE OFFLINE vmgdb01n
OFFLINE OFFLINE vmgdb02n
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cvu
1 ONLINE ONLINE vmgdb01n
ora.oc4j
1 ONLINE ONLINE vmgdb01n

ora.vmg.db
1 ONLINE ONLINE vmgdb01n Open
2 ONLINE ONLINE vmgdb02n Open
ora.vmgdb01n.vip
1 ONLINE ONLINE vmgdb01n
ora.vmgdb02n.vip
1 ONLINE ONLINE vmgdb02n

 

olsnodes -n -i

òvmgdb01n:/ORACLE> olsnodes -n -i
vmgdb01n 1 vmgdb01n-vip
vmgdb02n 2 vmgdb02n-vip

 

crsctl query css votedisk

vmgdb01n:/ORACLE> crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 97a1ccd5f7ca4f9ebf9ca9e23420e74a (/dev/raw/raw1) []
2. ONLINE 0ce6ebddc2764f97bfceaff24edc388e (/dev/raw/raw2) []
3. ONLINE ad28933487d24f09bf37169b8c67d786 (/dev/raw/raw3) []
Located 3 voting disk(s).

 

ocrcheck

vmgdb01n:/ORACLE> ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2884
Available space (kbytes) : 259236
ID : 560703319
Device/File Name : /dev/raw/raw4
Device/File integrity check succeeded
Device/File Name : /dev/raw/raw5
Device/File integrity check succeeded

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

crsctl get css disktimeout

crsctl get css misscount

crsctl get css reboottime

vmgdb01n:/ORACLE> crsctl get css disktimeout
CRS-4678: Successful get disktimeout 200 for Cluster Synchronization Services.
vmgdb01n:/ORACLE> crsctl get css misscount
CRS-4678: Successful get misscount 30 for Cluster Synchronization Services.
vmgdb01n:/ORACLE> crsctl get css reboottime
CRS-4678: Successful get reboottime 3 for Cluster Synchronization Services.

 

### crsctl 명령어 도움말

crsctl -h
Usage: crsctl add - add a resource, type or other entity
crsctl check - check a service, resource or other entity
crsctl config - output autostart configuration
crsctl debug - obtain or modify debug state
crsctl delete - delete a resource, type or other entity
crsctl disable - disable autostart
crsctl discover - discover DHCP server
crsctl enable - enable autostart
crsctl get - get an entity value
crsctl getperm - get entity permissions
crsctl lsmodules - list debug modules
crsctl modify - modify a resource, type or other entity
crsctl query - query service state
crsctl pin - pin the nodes in the node list
crsctl relocate - relocate a resource, server or other entity
crsctl replace - replaces the location of voting files
crsctl release - release a DHCP lease
crsctl request - request a DHCP lease
crsctl setperm - set entity permissions
crsctl set - set an entity value
crsctl start - start a resource, server or other entity
crsctl status - get status of a resource or other entity
crsctl stop - stop a resource, server or other entity
crsctl unpin - unpin the nodes in the node list
crsctl unset - unset an entity value, restoring its default

조금더 자세히...

#DB node 확인

srvctl status database -d <db_unique_name>
srvctl start database -d <db_unique_name>
srvctl config database -d 디비명
srvctl config nodeapps -a -g -s

#listener 확인

srvctl status scan_listener
srvctl config scan_listener

4.cluster
- 시작

$ srvctl start instance -d <db_unique_name> -i <인스턴스명>
$ srvctl start asm -n 노드명
$ srvctl start nodeapps -n 노드명


-종료

$ srvctl stop instance -d <db_unique_name> -i <인스턴스명>
$ srvctl stop asm -n 노드명
$ srvctl stop nodeapps -n 노드명

 

Posted by 목표를 가지고 달린다
,