오라클 10g ASM방식으로 RAC 설치 #9/9 (테스트)

1. Oracle Database 상태 확인 $ crs_stop -f ora.rac.db $ crs_start -f ora.rac.db $ crs_stat -t
Name Type Target State Host ———————————————————— ora.rac.db 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
$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.5.0 – Production on 04-MAR-2012 17:46:56 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 04-MAR-2012 16:22:24 Uptime 0 days 1 hr. 24 min. 31 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.126.31)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.126.131)(PORT=1521))) Services Summary… Service “+ASM” has 1 instance(s). Instance “+ASM1”, status BLOCKED, has 1 handler(s) for this service… Service “+ASM_XPT” has 1 instance(s). Instance “+ASM1”, status BLOCKED, has 1 handler(s) for this service… Service “PLSExtProc” has 1 instance(s). Instance “PLSExtProc”, status UNKNOWN, has 1 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
$ sqlplus / as sysdba
SQL> select status from v$instance;

STATUS
------------------------
OPEN


SQL> select name from v$controlfile;

NAME
--------------------------------------------------
+DATA/rac/controlfile/current.256.777056877
+FRA/rac/controlfile/current.256.777056881


SQL> select name from v$datafile;

NAME
--------------------------------------------------
+DATA/rac/datafile/system.259.777056907
+DATA/rac/datafile/undotbs1.260.777056927
+DATA/rac/datafile/sysaux.261.777056937
+DATA/rac/datafile/undotbs2.263.777056953
+DATA/rac/datafile/users.264.777056963


SQL> select group#, member from v$logfile;

    GROUP# MEMBER
---------- --------------------------------------------------
         1 +DATA/rac/onlinelog/group_1.257.777056883
         1 +FRA/rac/onlinelog/group_1.257.777056889
         2 +DATA/rac/onlinelog/group_2.258.777056893
         2 +FRA/rac/onlinelog/group_2.258.777056901
         3 +DATA/rac/onlinelog/group_3.265.777057803
         3 +FRA/rac/onlinelog/group_3.259.777057809
         4 +DATA/rac/onlinelog/group_4.266.777057809
         4 +FRA/rac/onlinelog/group_4.260.777057815
2. RAC Fail-Over 테스트 가. OLTP 서비스 생성 $ srvctl add service -d RAC -s oltp_service -r RAC1 -a RAC2 $ srvctl start service -d RAC -s oltp_service $ srvctl status service -d RAC -s oltp_service oltp_service 서비스가 rac1 인스턴스에서 실행 중임 나. CTF 작동여부 확인 < 노드 1에서 확인 >
SQL> show parameter service

NAME                                 TYPE                   VALUE
------------------------------------ ---------------------- ------------------------------
service_names                        string                 oltp_service
< 노드 2에서 확인 >
SQL> show parameter service

NAME                                 TYPE                   VALUE
------------------------------------ ---------------------- ------------------------------
service_names                        string                 rac
< 노드 1에서 작업 >
SQL> shutdown abort
ORACLE instance shut down.
< 노드 2에서 확인 >
SQL> show parameter service

NAME                                 TYPE                   VALUE
------------------------------------ ---------------------- ------------------------------
service_names                        string                 oltp_service
참고 : CTF vs TAF – 2 가지 형태 : CTF(Connection Time Failover), TAF(Transparent Application Failover) – Oracle8i Parallel Server 에서부터 제공. – TAF는 CTF의 부가적인 기능. 1. CTF(Connection Time Failover) – 말그대로 컨넥션시 Fail over 한다. – 기존에 접속되어 있던 application 은 리부팅을 해야한다. – DB 장애시 DB client 는 ORA-3113/3114 에러를 만나게 되며, 재접속을 해야 Failover가 됨. – Tuxedo와 연관성은 Tuxedo server(XA)와 TMS를 재부팅해야 한다. 그러나 xa_start 이후에 RMFAIL 을 받게되면, Tuxedo server(XA) 와 TMS는 RM 에 Reconnect 하게 되어 있다. 2. TAF(Transparent Application Failover) – CTF 의 단점을 보완하여 DB client 트랜잭션 처리중에 재부팅 필요없이 세션정보를 유지할수있음. – Failover_mode * Type – DEFAULT : non – TAF – SESSION : fetch 중 DB 장애시 해당 fetch Fail – SELECT : fetch 중 DB 장애시 해당 fetch 복원 * method : – BASIC : On-demand, 장애후 available 한 DB instance 로 접속. – PRECONNECT : fail-over 할 instance 지정, Load balancing 불가. 출처 : http://forusone.tistory.com/entry/Oracle-Real-Application-Clusters-CTFTAF

You may also like...

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 항목은 *(으)로 표시합니다