아 리 클 라 우 드 에 Oracle RAC - 침묵 모드 만 들 기 - 4

16200 단어 Oracle
이전 세 편의 글 의 모든 절 차 를 통 해 군집 은 성공 적 으로 구축 되 었 다.
리 스 너 상태 보기, lsnrctl status
[oracle@rac1 database]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 19-JUL-2018 13:25:12

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                19-JUL-2018 13:13:21
Uptime                    0 days 0 hr. 11 min. 51 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/grid_home/network/admin/listener.ora
Listener Log File         /u01/app/grid_base/diag/tnslsnr/rac1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.10.10.101)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.10.10.103)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "OAODZ" has 1 instance(s).
  Instance "oaodz11", status READY, has 1 handler(s) for this service...
Service "oaodz1XDB" has 1 instance(s).
  Instance "oaodz11", status READY, has 1 handler(s) for this service...
The command completed successfully

클 러 스 터 상 태 를 보면 일부 서 비 스 는 오프라인 입 니 다. 뒤의 절 차 는 그들 을 일 으 킵 니 다. 마지막 줄 에 서 는 scan - ip 이 rac 1 에 연결 되 어 있 는 것 을 볼 수 있 습 니 다.
[grid@rac1 bin]$ crs_stat -t -v
Name           Type           R/RA   F/FT   Target    State     Host        
----------------------------------------------------------------------
ora.DATA.dg    ora....up.type 0/5    0/     ONLINE    ONLINE    rac1        
ora....ER.lsnr ora....er.type 0/5    0/     ONLINE    ONLINE    rac1        
ora....N1.lsnr ora....er.type 0/5    0/0    ONLINE    ONLINE    rac1        
ora.OCR.dg     ora....up.type 0/5    0/     ONLINE    ONLINE    rac1        
ora.asm        ora.asm.type   0/5    0/     ONLINE    ONLINE    rac1        
ora.eons       ora.eons.type  0/3    0/     ONLINE    ONLINE    rac1        
ora.gsd        ora.gsd.type   0/5    0/     OFFLINE   OFFLINE               
ora....network ora....rk.type 0/5    0/     ONLINE    ONLINE    rac1        
ora.oaodz.db   ora....se.type 0/2    0/1    ONLINE    ONLINE    rac1        
ora.oc4j       ora.oc4j.type  0/5    0/0    OFFLINE   OFFLINE               
ora.ons        ora.ons.type   0/3    0/     ONLINE    ONLINE    rac1        
ora....SM1.asm application    0/5    0/0    ONLINE    ONLINE    rac1        
ora....C1.lsnr application    0/5    0/0    ONLINE    ONLINE    rac1        
ora.rac1.gsd   application    0/5    0/0    OFFLINE   OFFLINE               
ora.rac1.ons   application    0/3    0/0    ONLINE    ONLINE    rac1        
ora.rac1.vip   ora....t1.type 0/0    0/0    ONLINE    ONLINE    rac1        
ora....SM2.asm application    0/5    0/0    ONLINE    ONLINE    rac2        
ora....C2.lsnr application    0/5    0/0    ONLINE    ONLINE    rac2        
ora.rac2.gsd   application    0/5    0/0    OFFLINE   OFFLINE               
ora.rac2.ons   application    0/3    0/0    ONLINE    ONLINE    rac2        
ora.rac2.vip   ora....t1.type 0/0    0/0    ONLINE    ONLINE    rac2        
ora.scan1.vip  ora....ip.type 0/0    0/0    ONLINE    ONLINE    rac1        

정지 서비스 시작
#  oc4j  
[grid@rac1 bin]$ srvctl enable oc4j
[grid@rac1 bin]$ srvctl start oc4j

#  gsd  
[grid@rac1 bin]$ srvctl enable nodeapps
[grid@rac1 bin]$ srvctl start nodeapps

#        
[grid@rac1 bin]$ crs_stat -v -t
Name           Type           R/RA   F/FT   Target    State     Host        
----------------------------------------------------------------------
ora.DATA.dg    ora....up.type 0/5    0/     ONLINE    ONLINE    rac1        
ora....ER.lsnr ora....er.type 0/5    0/     ONLINE    ONLINE    rac1        
ora....N1.lsnr ora....er.type 0/5    0/0    ONLINE    ONLINE    rac1        
ora.OCR.dg     ora....up.type 0/5    0/     ONLINE    ONLINE    rac1        
ora.asm        ora.asm.type   0/5    0/     ONLINE    ONLINE    rac1        
ora.eons       ora.eons.type  0/3    0/     ONLINE    ONLINE    rac1        
ora.gsd        ora.gsd.type   0/5    0/     ONLINE    ONLINE    rac1        
ora....network ora....rk.type 0/5    0/     ONLINE    ONLINE    rac1        
ora.oaodz.db   ora....se.type 0/2    0/1    ONLINE    ONLINE    rac1        
ora.oc4j       ora.oc4j.type  0/5    0/0    ONLINE    ONLINE    rac2        
ora.ons        ora.ons.type   0/3    0/     ONLINE    ONLINE    rac1        
ora....SM1.asm application    0/5    0/0    ONLINE    ONLINE    rac1        
ora....C1.lsnr application    0/5    0/0    ONLINE    ONLINE    rac1        
ora.rac1.gsd   application    0/5    0/0    ONLINE    ONLINE    rac1        
ora.rac1.ons   application    0/3    0/0    ONLINE    ONLINE    rac1        
ora.rac1.vip   ora....t1.type 0/0    0/0    ONLINE    ONLINE    rac1        
ora....SM2.asm application    0/5    0/0    ONLINE    ONLINE    rac2        
ora....C2.lsnr application    0/5    0/0    ONLINE    ONLINE    rac2        
ora.rac2.gsd   application    0/5    0/0    ONLINE    ONLINE    rac2        
ora.rac2.ons   application    0/3    0/0    ONLINE    ONLINE    rac2        
ora.rac2.vip   ora....t1.type 0/0    0/0    ONLINE    ONLINE    rac2        
ora.scan1.vip  ora....ip.type 0/0    0/0    ONLINE    ONLINE    rac1        

scan - ip 로 데이터베이스 연결
 
[oracle@rac1 database]$ ping scan-ip
PING scan-ip (10.10.10.105) 56(84) bytes of data.
64 bytes from scan-ip (10.10.10.105): icmp_seq=1 ttl=64 time=0.017 ms
64 bytes from scan-ip (10.10.10.105): icmp_seq=2 ttl=64 time=0.040 ms
64 bytes from scan-ip (10.10.10.105): icmp_seq=3 ttl=64 time=0.032 ms

[oracle@rac1 database]$ sqlplus sys/Capgemini123@scan-ip/OAODZ as sysdba;

SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 19 13:38:33 2018

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> select sysdate from dual;

SYSDATE
-------------------
2018-07-19 13:38:58

SQL> 

무 리 를 지어 멈추다.
###    
##    ,                ,  crsctl   
[grid@rac1 bin]$ crs_stop -all
Attempting to stop `ora.ons` on member `rac2`
Attempting to stop `ora.LISTENER.lsnr` on member `rac2`
Attempting to stop `ora.LISTENER.lsnr` on member `rac1`
Attempting to stop `ora.oc4j` on member `rac2`
Attempting to stop `ora.gsd` on member `rac2`
Attempting to stop `ora.eons` on member `rac1`
Attempting to stop `ora.DATA.dg` on member `rac1`
Attempting to stop `ora.OCR.dg` on member `rac1`
Attempting to stop `ora.oaodz.db` on member `rac1`
Attempting to stop `ora.gsd` on member `rac1`
Attempting to stop `ora.eons` on member `rac2`
Attempting to stop `ora.DATA.dg` on member `rac2`
Attempting to stop `ora.OCR.dg` on member `rac2`
Attempting to stop `ora.oaodz.db` on member `rac2`
Stop of `ora.LISTENER.lsnr` on member `rac1` succeeded.
Attempting to stop `ora.ons` on member `rac1`
Attempting to stop `ora.rac1.vip` on member `rac1`
Attempting to stop `ora.LISTENER_SCAN1.lsnr` on member `rac1`
Stop of `ora.gsd` on member `rac1` succeeded.
CRS-2789: Cannot stop resource 'ora.gsd' as it is not running on server 'rac1'
Stop of `ora.LISTENER.lsnr` on member `rac2` succeeded.
CRS-2789: Cannot stop resource 'ora.LISTENER.lsnr' as it is not running on server 'rac2'
Attempting to stop `ora.rac2.vip` on member `rac2`
Stop of `ora.gsd` on member `rac2` succeeded.
CRS-2789: Cannot stop resource 'ora.gsd' as it is not running on server 'rac2'
Stop of `ora.rac2.vip` on member `rac2` succeeded.
Stop of `ora.LISTENER_SCAN1.lsnr` on member `rac1` succeeded.
Attempting to stop `ora.scan1.vip` on member `rac1`
Stop of `ora.ons` on member `rac1` succeeded.
CRS-2789: Cannot stop resource 'ora.ons' as it is not running on server 'rac1'
Stop of `ora.ons` on member `rac2` succeeded.
CRS-2789: Cannot stop resource 'ora.ons' as it is not running on server 'rac2'
Attempting to stop `ora.net1.network` on member `rac2`
Stop of `ora.net1.network` on member `rac2` succeeded.
Stop of `ora.rac1.vip` on member `rac1` succeeded.
Stop of `ora.scan1.vip` on member `rac1` succeeded.
Attempting to stop `ora.net1.network` on member `rac1`
Stop of `ora.net1.network` on member `rac1` succeeded.
Stop of `ora.eons` on member `rac1` succeeded.
Stop of `ora.eons` on member `rac2` succeeded.

 root     :crsctl stop crs
##crs          ,        crs            
[root@rac1 oracle]# /u01/app/grid_home/bin/crsctl stop crs
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac1'
CRS-2673: Attempting to stop 'ora.crsd' on 'rac1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac1'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'rac1'
CRS-2677: Stop of 'ora.DATA.dg' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac1'
CRS-2677: Stop of 'ora.asm' on 'rac1' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac1' has completed
CRS-2677: Stop of 'ora.crsd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac1'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac1'
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'rac1'
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac1'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac1'
CRS-2673: Attempting to stop 'ora.asm' on 'rac1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'rac1' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac1'
CRS-2677: Stop of 'ora.cssd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.diskmon' on 'rac1'
CRS-2673: Attempting to stop 'ora.gipcd' on 'rac1'
CRS-2677: Stop of 'ora.gipcd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.diskmon' on 'rac1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac1' has completed
CRS-4133: Oracle High Availability Services has been stopped.

###    
#   crs,                      

/bin/dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1

# root  
[root@rac1 oracle]# /u01/app/grid_home/bin/crsctl start crs
CRS-4123: Oracle High Availability Services has been started.
#CRS        ,      CRS      ,       CRS,      
CRS-0184: Cannot communicate with the CRS daemon.

#      
#grid  ,     ,          
[grid@rac1 ~]$ crs_start -all
CRS-5702: Resource 'ora.asm' is already running on 'rac1'
CRS-5702: Resource 'ora.asm' is already running on 'rac1'
CRS-5702: Resource 'ora.gsd' is already running on 'rac1'
CRS-5702: Resource 'ora.ons' is already running on 'rac1'
Attempting to start `ora.oc4j` on member `rac1`
Attempting to start `ora.OCR.dg` on member `rac2`
Attempting to start `ora.gsd` on member `rac2`
Attempting to start `ora.eons` on member `rac2`
Attempting to start `ora.DATA.dg` on member `rac1`
Attempting to start `ora.rac1.vip` on member `rac1`
Attempting to start `ora.scan1.vip` on member `rac1`
Attempting to start `ora.net1.network` on member `rac2`
Start of `ora.OCR.dg` on member `rac2` succeeded.
Start of `ora.gsd` on member `rac2` succeeded.
CRS-5702: Resource 'ora.gsd' is already running on 'rac2'
Start of `ora.net1.network` on member `rac2` succeeded.
Start of `ora.DATA.dg` on member `rac1` succeeded.
Start of `ora.scan1.vip` on member `rac1` succeeded.
Attempting to start `ora.LISTENER_SCAN1.lsnr` on member `rac1`
Start of `ora.rac1.vip` on member `rac1` succeeded.
Attempting to start `ora.LISTENER.lsnr` on member `rac1`
Start of `ora.LISTENER_SCAN1.lsnr` on member `rac1` succeeded.
Start of `ora.LISTENER.lsnr` on member `rac1` succeeded.
Attempting to start `ora.ons` on member `rac2`
Start of `ora.eons` on member `rac2` succeeded.
Start of `ora.ons` on member `rac2` succeeded.
CRS-5702: Resource 'ora.ons' is already running on 'rac2'
Attempting to start `ora.oaodz.db` on member `rac1`
Start of `ora.oc4j` on member `rac1` succeeded.
Start of `ora.oaodz.db` on member `rac1` succeeded.
Attempting to start `ora.rac2.vip` on member `rac2`
Start of `ora.rac2.vip` on member `rac2` succeeded.
Attempting to start `ora.LISTENER.lsnr` on member `rac2`
Start of `ora.LISTENER.lsnr` on member `rac2` succeeded.
CRS-5702: Resource 'ora.LISTENER.lsnr' is already running on 'rac2'
Attempting to start `ora.oaodz.db` on member `rac2`
Start of `ora.oaodz.db` on member `rac2` succeeded.
CRS-0223: Resource 'ora.LISTENER.lsnr rac2 1' has placement error.

CRS-0223: Resource 'ora.asm' has placement error.

CRS-0223: Resource 'ora.ons rac2 1' has placement error.

CRS-0223: Resource 'ora.rac1.ASM1.asm' has placement error.

CRS-0223: Resource 'ora.rac1.gsd' has placement error.

CRS-0223: Resource 'ora.rac1.ons' has placement error.

[grid@rac1 ~]$ crs_stat -v -t
Name           Type           R/RA   F/FT   Target    State     Host        
----------------------------------------------------------------------
ora.DATA.dg    ora....up.type 0/5    0/     ONLINE    ONLINE    rac1        
ora....ER.lsnr ora....er.type 0/5    0/     ONLINE    ONLINE    rac1        
ora....N1.lsnr ora....er.type 0/5    0/0    ONLINE    ONLINE    rac1        
ora.OCR.dg     ora....up.type 0/5    0/     ONLINE    ONLINE    rac1        
ora.asm        ora.asm.type   0/5    0/     ONLINE    ONLINE    rac1        
ora.eons       ora.eons.type  0/3    0/     ONLINE    ONLINE    rac1        
ora.gsd        ora.gsd.type   0/5    0/     ONLINE    ONLINE    rac1        
ora....network ora....rk.type 0/5    0/     ONLINE    ONLINE    rac1        
ora.oaodz.db   ora....se.type 0/2    0/1    ONLINE    ONLINE    rac1        
ora.oc4j       ora.oc4j.type  0/5    0/0    ONLINE    ONLINE    rac1        
ora.ons        ora.ons.type   0/3    0/     ONLINE    ONLINE    rac1        
ora....SM1.asm application    0/5    0/0    ONLINE    ONLINE    rac1        
ora....C1.lsnr application    0/5    0/0    ONLINE    ONLINE    rac1        
ora.rac1.gsd   application    0/5    0/0    ONLINE    ONLINE    rac1        
ora.rac1.ons   application    0/3    0/0    ONLINE    ONLINE    rac1        
ora.rac1.vip   ora....t1.type 0/0    0/0    ONLINE    ONLINE    rac1        
ora....SM2.asm application    0/5    0/0    ONLINE    ONLINE    rac2        
ora....C2.lsnr application    0/5    0/0    ONLINE    ONLINE    rac2        
ora.rac2.gsd   application    0/5    0/0    ONLINE    ONLINE    rac2        
ora.rac2.ons   application    0/3    0/0    ONLINE    ONLINE    rac2        
ora.rac2.vip   ora....t1.type 0/0    0/0    ONLINE    ONLINE    rac2        
ora.scan1.vip  ora....ip.type 0/0    0/0    ONLINE    ONLINE    rac1        
[grid@rac1 ~]$ 

다른 명령:
srvctl stop listener crs_stat -t -v srvctl stop database -d OAODZ  crs_stat -t -v srvctl stop asm -n rac1 srvctl stop asm -n rac2 crs_stat -t -v
srvctl start nodeapps -n rac1 srvctl start nodeapps -n rac2 srvctl start asm -n rac1 srvctl start asm -n rac2 srvctl start database -d OAODZ srvctl start listener

좋은 웹페이지 즐겨찾기