ºìÁªLinuxÃÅ»§
Linux°ïÖú

tnsname֮˫IP failoverÎÊÌâ

·¢²¼Ê±¼ä:2008-08-04 20:51:25À´Ô´:ºìÁª×÷Õß:panaiec
Èç¹ûÊÇdataguard,¾­³£ÔÚÓ¦ÓöËÅäÖÃË«IP£¬ÒÔ±ãÔÚÊý¾Ý¿âÇл»Ê±£¬Ó¦Óö˲»ÓÃ×÷Èκεĸı䡣µ«ÔÚORACLE 9iÀÕâÖÖ·½Ê½ÅäÖõÄtnsname,´æÔÚ×ÅÈçϵÄÎÊÌâ¡£µ±ÐèÒª¶ÔµÚÒ»¸öIP½øÐÐÍ£»úά»¤Ê±£¬¼´µÚÒ»¸öIP²»´æÔÚʱ£¬ÐèÒªºÜ³¤Ò»¶Îʱ¼ä¿Í»§¶Ë²ÅÄÜfailoverµ½µÚ¶þ¸öIPÉÏ£¬´´½¨ÐµÄÁ¬½Ó.Õâ¸öÎÊÌ⣬ҲÔø¾­µ¼Ö¹ýÒ»´ÎÉú²ú¿âʹʡ£

ÔÚoracle 9iÀ½øÐÐÈçϵIJâÊÔ:

ÒýÓÃ:
db_tns =
(DESCRIPTION =
(failover = on )
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.168.100)(PORT = 1521)) --µÚÒ»¸öIP²»´æÔÚ
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.168.120)(PORT = 1521)) --Õâ¸öIP´ËʱÊÇÖ÷¿â
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = test)
)
)


db_stb:/u01/oracle/product/9.2/network/admin>$tnsping db_tns

TNS Ping Utility for IBM/AIX RISC System/6000: Version 9.2.0.6.0 - Production on 04-AUG-2008 13:59:02

Copyright (c) 1997 Oracle Corporation. All rights reserved.

Used parameter files:
/u01/oracle/product/9.2/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (failover = on) (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.168.100)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.168.120)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SID = test)))
OK (76380 msec) --ÕâÀï×ܹ²»¨ÁË76ÃëÖÓ


ÔÚ10gÀÈç¹ûÅäÖÃÁËË«IP,Èç¹ûµÚÒ»¸öIP²»´æÔÚ£¬tnspingµÄËÙ¶ÈÒ²¿ìÁËÐí¶à£¬ÔÚ±¾´Î²âÊÔÖУ¬Ö»ÐèÒª3ÃëÖÓ¾Íתµ½µÚ¶þ¸öIPÉÏÀ´ÁË¡£

ÒýÓÃ:
db_tns =
(DESCRIPTION =
(failover = on )
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.168.100)(PORT = 1521)) --µÚÒ»¸öIP²»´æÔÚ
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.168.120)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = test)
)
)

[oracle@dbtest admin]$ tnsping db_tns

TNS Ping Utility for Linux: Version 10.2.0.4.0 - Production on 04-AUG-2008 13:36:23

Copyright (c) 1997, 2007, Oracle. All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (failover = on) (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.168.100)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.168.120)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SID = test)))
OK (3010 msec)


¿´À´ORACLE£¬»¹ÊÇÔÚ²»¶Ï¸Ä½øµÄ¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ