Oracle RAC Load Balance , Fail Over測試

tolywang發表於2007-08-03
配置server端的tnsnames.ora,首先來看各例項的remote_listener和local_listener情況:

rac1:


SQL> show parameter listener

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string LISTENER_RAC1
mts_listener_address string
mts_multiple_listeners boolean FALSE
remote_listener string LISTENERS_RAC


rac2:

SQL> show parameter listener

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string LISTENER_RAC2
mts_listener_address string
mts_multiple_listeners boolean FALSE
remote_listener string LISTENERS_RAC


rac3:
SQL> show parameter listener

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string LISTENER_RAC3
mts_listener_address string
mts_multiple_listeners boolean FALSE
remote_listener string LISTENERS_RAC

==================================================


tnsnames:

rac1:
# Generated by Oracle configuration tools.

LISTENERS_RAC =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = IBSSAPP)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = LBAS)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = LBASAPP)(PORT = 1521))
)

RAC2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = LBASAPP)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = rac)
(INSTANCE_NAME = rac2)
)
)


RAC3 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = LBAS)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = rac)
(INSTANCE_NAME = rac3)
)
)

LISTENER_RAC1 =
(ADDRESS = (PROTOCOL = TCP)(HOST = IBSSAPP)(PORT = 1521))


RAC1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = IBSSAPP)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = rac)
(INSTANCE_NAME = rac1)
)
)

INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = IBSSAPP)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = MODOSE)
(PRESENTATION =
)
)
)

RAC =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = IBSSAPP)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = LBAS)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = LBASAPP)(PORT = 1521))
(LOAD_BALANCE = yes)
)
(CONNECT_DATA =
(SERVICE_NAME = rac)
)
)
failover =
(DESCRIPTION =
(enable=broken)
(LOAD_BALANCE = yes)
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.17.36.81)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.17.36.82)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.17.36.83)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = rac)
(failover_mode=(type=select)(method=basic))
)
)
-----------------------------------------------------

rac2:tnsnames
# Generated by Oracle configuration tools.

LISTENERS_RAC =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = IBSSAPP)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = LBAS)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = LBASAPP)(PORT = 1521))
)

LISTENER_RAC2 =
(ADDRESS = (PROTOCOL = TCP)(HOST = LBASAPP)(PORT = 1521))


RAC2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = LBASAPP)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = rac)
(INSTANCE_NAME = rac2)
)
)

RAC3 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = LBAS)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = rac)
(INSTANCE_NAME = rac3)
)
)

RAC1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = IBSSAPP)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = rac)
(INSTANCE_NAME = rac1)
)
)

INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = IBSSAPP)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = MODOSE)
(PRESENTATION =
)
)
)

RAC =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = IBSSAPP)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = LBAS)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = LBASAPP)(PORT = 1521))
(LOAD_BALANCE = yes)
)
(CONNECT_DATA =
(SERVICE_NAME = rac)
)
)
failover =
(DESCRIPTION =
(enable=broken)
(LOAD_BALANCE = yes)
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.17.36.81)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.17.36.82)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.17.36.83)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = rac)
(failover_mode=(type=select)(method=basic))
)
)

--------------------------------------------
rac3:tnsnames.
# Generated by Oracle configuration tools.

LISTENERS_RAC =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = IBSSAPP)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = LBAS)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = LBASAPP)(PORT = 1521))
)

LISTENER_RAC3 =
(ADDRESS = (PROTOCOL = TCP)(HOST = LBAS)(PORT = 1521))


RAC2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = LBASAPP)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = rac)
(INSTANCE_NAME = rac2)
)
)

RAC3 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = LBAS)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = rac)
(INSTANCE_NAME = rac3)
)
)

RAC1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = IBSSAPP)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = rac)
(INSTANCE_NAME = rac1)
)
)

INST1_HTTP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = IBSSAPP)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = MODOSE)
(PRESENTATION =
)
)
)

RAC =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = IBSSAPP)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = LBAS)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = LBASAPP)(PORT = 1521))
(LOAD_BALANCE = yes)
)
(CONNECT_DATA =
(SERVICE_NAME = rac)
)
)
failover =
(DESCRIPTION =
(enable=broken)
(LOAD_BALANCE = yes)
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.17.36.81)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.17.36.82)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.17.36.83)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = rac)
(failover_mode=(type=select)(method=basic))
)
)


====================================================================


listener.ora

rac1.

# Generated by Oracle configuration tools.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = IBSSAPP)(PORT = 1521))
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/rac/oracle/ora9i/app/oracle/product/902)
(PROGRAM = extproc)
)
(SID_DESC =
(ORACLE_HOME = /oracle/rac/oracle/ora9i/app/oracle/product/902)
(SID_NAME = rac1)
)
)
-------------------------------------------------------------

rac2.

# Generated by Oracle configuration tools.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = LBASAPP)(PORT = 1521))
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/rac/oracle/ora9i/app/oracle/product/902)
(PROGRAM = extproc)
)
(SID_DESC =
(ORACLE_HOME = /oracle/rac/oracle/ora9i/app/oracle/product/902)
(SID_NAME = rac2)
)
)

----------------------------------------------
rac3.

# Generated by Oracle configuration tools.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = LBAS)(PORT = 1521))
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/rac/oracle/ora9i/app/oracle/product/902)
(PROGRAM = extproc)
)
(SID_DESC =
(ORACLE_HOME = /oracle/rac/oracle/ora9i/app/oracle/product/902)
(SID_NAME = rac3)
)
)


==========================================================


client:
ractest =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.17.36.81)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.17.36.82)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.17.36.83)(PORT = 1521))
)
(LOAD_BALANCE = ON)
(FAILOVER = ON)
(CONNECT_DATA =
(SERVICE_NAME = rac)
(FAILOVER_METHOD =
(TYPE = SESSION)
(METHOD = BASIC)
)
)
)

測試工具:load_runner

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

相關文章