rac failover and load_balance

tolilong發表於2012-07-01

Service name

Select * from dba_services

alter system set service_names=a,b,c,d;

 

select service_name from v$session where sid=(select sid from v$mystat where rownum=1)  àcheck the service name

 

select * from v$servicemetric   à檢視業務情況一起負載。

 

1.failover

a).connect time failover     àclient端實現的

    把地址列表加進去,連的時候選擇實現。

b).TAF()   àclient端實現的

(FAILOVER_MODE =

        (TYPE = SELECT)      --select/session(轉移session)

        (METHOD = BASIC)    

        (RETRIES = 180)      --嘗試180  

        (DELAY = 5)           --每過5ms嘗試一次

      )

c).TAF(transparent application failover)   àservice實現的

    dbms_service package 修改service的屬性

 

    exec dbms_service.modify_service(

service_name=>'myrac',

failover_method => dbms_service.failover_method_basic,

failover_type => dbms_service.failover_type_select,

failover_retries=>100,

failover_delay => 5)

 

---tnsname.ora    

MYRAC_TAF_S =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.201.18.193)(PORT = 1521))

      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.201.18.194)(PORT = 1521))

      (LOAD_BALANCE = yes)

    )

    (CONNECT_DATA =

      (SERVICE_NAME = myrac)

    )

  )

 

 

 

2.load_balance

a).client

  主要加了:

   (LOAD_BALANCE = yes)

 

b).server

    利用引數:

    Remote_listener

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24237320/viewspace-734255/,如需轉載,請註明出處,否則將追究法律責任。

相關文章