흐르는 시간의 블로그...


1. RAC 노드1 에서 crs 재시작 후 확인

$ crs_stop -f ora.rac.db
Attempting to stop `ora.rac.db` on member `rac1`
Stop of `ora.rac.db` on member `rac1` succeeded.

$ crs_start -f ora.rac.db
Attempting to start `ora.rac.db` on member `rac1`
Start of `ora.rac.db` on member `rac1` succeeded.

$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.rac.db application ONLINE ONLINE rac2
ora....vice.cs application ONLINE ONLINE rac1
ora....ac1.srv application ONLINE ONLINE rac1
ora....c1.inst application ONLINE ONLINE rac1
ora....c2.inst application ONLINE ONLINE rac2
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2

※ Target, State 모두 ONLINE 표시확인 = RAC구성 완료





2. rac1 리스너 상태 확인

[oracle@rac1 ~]$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 07-MAR-2012 16:34:22

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER_RAC1
Version TNSLSNR for Linux: Version 10.2.0.5.0 - Production
Start Date 07-MAR-2012 15:47:02
Uptime 0 days 0 hr. 47 min. 19 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/product/10g/db/network/admin/listener.ora
Listener Log File /home/oracle/product/10g/db/network/log/listener_rac1.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.204.28)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.204.128)(PORT=1521)))
Services Summary...
Service "oltp_service" has 1 instance(s).
Instance "rac1", status READY, has 2 handler(s) for this service...
Service "rac" has 2 instance(s).
Instance "rac1", status READY, has 2 handler(s) for this service...
Instance "rac2", status READY, has 1 handler(s) for this service...
Service "rac_XPT" has 2 instance(s).
Instance "rac1", status READY, has 2 handler(s) for this service...
Instance "rac2", status READY, has 1 handler(s) for this service...
The command completed successfully

▶ Service "oltp_service" has 1 instance(s).
Instance "rac1", status READY, has 2 handler(s) for this service...
메시지가 중간에 표시되면 oltp_service 정상 작동 상태






3. RAC 노드1 에서 oltp_service 생성

1) rac1는 oltp_service, rac2는 fail-over로 생성

$ srvctl add service -d rac -s oltp_service -r rac1 -a rac2




2) oltp_service 시작

[oracle@rac1 ~]$ srvctl start service -d RAC -s oltp_service



3) oltp_service 상태확인

[oracle@rac1 ~]$ srvctl status service -d RAC -s oltp_service
Service oltp_service is running on instance(s) rac1
▶ "oltp_service 서비스가 rac1 인스턴스에서 실행 중임"
: 정상 동작





4. 서비스 파라미터 상태 확인

1) 현재상태 확인
** RAC 노드1

$ sqlplus / as sysdba;
SQL> show parameter service;

NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
service_names string oltp_service




** RAC 노드2

SQL> show parameter service;
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
service_names string rac





2) 캐시 퓨전 확인 - rac1 강제 종료 → rac2 가 oltp_service로 전환됨

① 강제종료후 확인
** RAC 노드1

SQL> shutdown abort;



** RAC 노드2

SQL> show parameter service;
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
service_names string oltp_service




② rac1 DB open 후 확인

SQL> startup
SQL> show parameter service

NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
service_names string rac




※ oltp_service 재배치 방법

$ srvctl relocate service -d rac -s oltp_service -i rac2 -t rac1