I found the following link regarding JDBC for RAC...
*
*
http://programmersjournal.blogspot.com/2008/08/jdbc-connection-string-for-oracle-rac.html

the solution would be this:
*
*

jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)
 (ADDRESS=(PROTOCOL=TCP)(HOST=host1) (PORT=1521))
 (ADDRESS=(PROTOCOL=TCP)(HOST=host2) (PORT=1521))
 (CONNECT_DATA=(SERVICE_NAME=service)
   (FAILOVER_MODE =
     (TYPE = SELECT)
     (METHOD = BASIC)

     (RETRIES = 180)
     (DELAY = 5)
   )
)
)

/Mats/

On Wed, Feb 8, 2012 at 8:16 PM, chris schiffman <[email protected]> wrote:

> Hello,
>
> I'm connecting to an oracle RAC datasource.  When connecting to RAC,
> you have to use the service name and not the SID.  I figured out if i
> manually edit the xml config (edit to a slash instead of a colon), it
> works fine.  However, I can't figure out how to configure a hot
> standby server as well.  Oracle recommends placing the standby in the
> second position of the connection string:
>
> PROD =
> (DESCRIPTION =
>  (ADDRESS_LIST =
>  (ADDRESS = (PROTOCOL = TCP)(HOST = prod.world.com)(PORT = 1521))
>  (ADDRESS = (PROTOCOL = TCP)(HOST = stdby.world.com)(PORT = 1521))
>  )
>  (CONNECT_DATA =
>  (SERVICE_NAME = prod_db )
>  )
> )
>
> However, i'm having trouble figuring out how to do this correctly in
> the bluedragon.xml file.  Here is what i currently have:
>
>    <datasource name="prod">
>      <displayname>prod_db</displayname>
>      <password></password>
>      <connectionretries>2</connectionretries>
>      <sqldelete>false</sqldelete>
>      <sqlupdate>false</sqlupdate>
>      <username>USER</username>
>      <drivername>oracle.jdbc.OracleDriver</drivername>
>      <sqlstoredprocedures>true</sqlstoredprocedures>
>      <perrequestconnections>false</perrequestconnections>
>      <sqlinsert>false</sqlinsert>
>      <sqlselect>false</sqlselect>
>      <connectiontimeout>60</connectiontimeout>
>      <port>1521</port>
>      <server>myoraclehost</server>
>      <databasename>orcl</databasename>
>      <description></description>
>      <connectstring></connectstring>
>      <initstring></initstring>
>      <logintimeout>60</logintimeout>
>      <hoststring>jdbc:oracle:thin:@myoraclehost:1521/orcl</
> hoststring>
>      <maxconnections>20</maxconnections>
>      <name>prod_db</name>
>    </datasource>
>
> I tried putting the data in the "connectstring" element, but it doesnt
> seem to work (or i have it formatted incorrectly).  Has anyone done
> this successfully?
>
> Thanks!
> -chris
>
> --
> online documentation: http://openbd.org/manual/
>   google+ hints/tips: https://plus.google.com/115990347459711259462
>     http://groups.google.com/group/openbd?hl=en
>
>     Join us @ http://www.OpenCFsummit.org/ Dallas, Feb 2012
>



-- 
*Mats Strömberg*
*NETWORK 23*
*Oracle Tablespace Report (Open Source)*
Project Homepage: project-otr.jelastic.com
Source Code: Google
Code<http://code.google.com/p/oracle-tablespace-report/source/checkout>
Still paying to use CFML? Keep your money and switch to
OpenBD<http://www.openbluedragon.org>

-- 
online documentation: http://openbd.org/manual/
   google+ hints/tips: https://plus.google.com/115990347459711259462
     http://groups.google.com/group/openbd?hl=en

     Join us @ http://www.OpenCFsummit.org/ Dallas, Feb 2012

Reply via email to