This discussion is archived
1 Reply Latest reply: Dec 14, 2005 5:10 PM by efrain.sanchez RSS

how to use the RAC

466983 Newbie
Currently Being Moderated
We have used 9i before ,now We install the 10g RAC, but I wannt to know how to connect database by use jdbc for application .
We use jdbc:ipaddress:instancename:port before ,but now how to deal with it ?
10g RAC have two instance name, but 9i have one .
  • 1. Re: how to use the RAC
    efrain.sanchez Newbie
    Currently Being Moderated
    Hi, You can connect to RAC using the thin or oci jdbc, for example

    thin driver without connection failover:
    jdbc:oracle:thin:@//host1-vip:1521/db-service

    thin driver with connection failover

    jdbc:oracle:thin:@
         (DESCRIPTION =
         (ADDRESS = (PROTOCOL = TCP)(HOST = host1-vip)(PORT = 1521))
         (ADDRESS = (PROTOCOL = TCP)(HOST = host2-vip)(PORT = 1521))
         (LOAD_BALANCE = yes)
         (CONNECT_DATA =
              (SERVER = DEDICATED)
              (SERVICE_NAME = db-service)
              (FAILOVER_MODE =(TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 5))
         )
         )

    oci driver:

    jdbc:oracle:oci:@TNS_ALIAS


    Regards,
    Efrain.