本地远程访问集群Oracle

1、配置IP映射
打开C:\WINDOWS\system32\drivers\etc(RedHat 在根目录etc)下的hosts文件,在文件末尾加上如下配置
# Do not remove the following line, or various programs
# that require network functionality will fail.
32.129.22.3	websphere01	
32.129.22.7	websphere02	


127.0.0.1	Splashtop	
127.0.0.1	localhost	#	must	be	added
X11UseLocalhost	yes	
XAuthLocation	/usr/bin/xauth	
32.129.22.21	weblogicA1	
32.129.22.22	weblogicA2	
32.129.22.34 vip-db01
32.129.22.35 vip-db02
32.129.22.36 vip-db03


2、配置本地oracle监听
打开ORACLE_HOME\network\admin下的tnsnames.ora文件,在末尾加上如下配置
ORCL_32.129.6.112 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 32.129.6.112)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = orcl)
      (SERVER = DEDICATED)
    )
  )

HAXZQL3 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = vip-db03)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = HAXZQL3)
    )
  )

HAXZQL2 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = vip-db02)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = HAXZQL2)
    )
  )

HAXZQL1 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = vip-db01)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = HAXZQL1)
    )
  )

HAXZQL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (LOAD_BALANCE = YES)
      (ADDRESS = (PROTOCOL = TCP)(HOST = vip-db01)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = vip-db02)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = vip-db03)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = HAXZQL)
      (FAILOVER_MODE =
        (TYPE = SELECT)
        (MODE = BASIC)
        (RETRY = 3)
        (DELAY = 5)
      )
    )
  )

你可能感兴趣的:(oracle,C++,c,windows,redhat)