Hi Mats,

In my example, the scan host (prodscan.local) resolves to 3 ips that
are cycled by the RAC nodes.  The second server is strictly the
dataguard failover.. So yes, this is using the preferred method of 1
scan_host, resolving to all rac nodes.  We've extensively tested rac
failover, dataguard failover, and even scan dns failure.

Another example of the connectstring using the OpenBD api:

    <datasource name="prod_db">
      <displayname>prod_db</displayname>
      <password>xxxxxxxxxxx</password>
      <connectionretries>2</connectionretries>
      <sqldelete>false</sqldelete>
      <sqlupdate>false</sqlupdate>
      <username>myapp</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>prodscan.local</server>
      <databasename>argpay</databasename>
      <description></description>
      <connectstring></connectstring>
      <logintimeout>60</logintimeout>
      <initstring></initstring>
      <hoststring>jdbc:oracle:thin:@prodscan.local:1521/
myrac_servicename</hoststring>
      <maxconnections>20</maxconnections>
      <name>prod_db</name>
    </datasource>

Where 'prodscan.local' is the SCAN host name.  You'll have to manually
edit the bluedragon.xml file because the admin console doesn't let you
create the hoststring with service_name notation.  Maybe try using the
ojdbc14.jar file and see if the problem persists?

Hopefully it'll work for you.
-chris


On Jun 4, 11:21 am, Mats S
tromberg <[email protected]> wrote:
> Hi Chris,
>
> Well, I'm using the "new" way introduced with the 11gR2 where I don't need
> more than one SCAN address... which uses the ojdbc6.jar
>
> Just checking if the Instance is a RAC and if so using the
> scan_host:Port/service_name
> otherwise standard   hostname:Port:SID
>
> <cfset s = StructNew() />
> <cfset s.hoststring      = "jdbc:oracle:thin:@scan_hostname:1530/service_name"
> />
> <cfset s.drivername   = "oracle.jdbc.OracleDriver" />
> <cfset s.databasename = "OraSID" />
> <cfset s.username     = "system" />
> <cfset s.password     = "system_pw" />
> <cfset s.port               = "1530" />
>
> <cfif NOT DataSourceIsValid("#UCase(qInstances.db_name)#temp")>
>             <cfset DataSourceCreate( "#UCase(qInstances.db_name)#temp", s )
> />
> </cfif>
>
> And this do generate 17002 Errror from time to time...
>
> I was hoping this would have worked since I could use by Instance Table in
> OTR just as it was before  only adding a flag for RAC or not and a field
> for Service Name.
>
> If this stays as an error I have to pickup all registered hosts for the
> cluster and build something like you described..  but using the
> LOAD_BALANCE=ON and each host and listener port and build an ADDRESS_LIST
> the "old" way....  Was hoping I could avoid that.
>
> As of 11gR2 this is supposed to be the preferred way by Oracle... but not
> sure it's fully tested really...
>
> /Mats/
>
>
>
>
>
>
>
>
>
> On Mon, Jun 4, 2012 at 5:50 PM, chris schiffman <[email protected]> wrote:
> > Hi Mats,
>
> > I'm using ojdbc14.jar, connecting to a dual node 11gr2 RAC setup using
> > SCAN and I haven't had any issues (except for the maxconnections which
> > is fixed in the latest nightly build).  We have a dataguard failover
> > setup as well, here is my connection string:
>
> > <cfset  ds = {
> >                username : "myapp",
> >                password : "xxxxxxxxxx",
> >                databasename : "prod_db",
> >                logintimeout : "5",
> >                connectiontimeout : "5",
> >                connectionretries : "2",
> >                maxconnections : "20",
> >                drivername : "oracle.jdbc.OracleDriver",
> >                hoststring : "jdbc:oracle:thin:@(DESCRIPTION=(FAILOVER=ON)
> > (ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=prodscan.local)(PORT=1521))
> > (ADDRESS=(PROTOCOL=TCP)(HOST=dataguard.local)(PORT=1521)))
> > (CONNECT_DATA=(SERVICE_NAME=myrac)))"}>
>
> > <cfset DataSourceCreate( "prod_db", ds )>
>
> > This is currently in a production environment under VERY extreme load.
>
> > Hope that helps,
> > -chris
>
> > On Jun 4, 2:50 am, Mats Stromberg <[email protected]> wrote:
> > > Has anyone run into a problem connecting to an Oracle RAC with the new
> > > ojdbc6.jar and connect using Single Client Access Name (SCAN) on a 11gR2
> > ?
> > > I'm running into a strange problem that I'm getting an ORA-17002 error "
> > Io
> > > exception: The Network Adapter could not establish the connection".
> > > I'm using this feature now in OTR which connects every 5 minutes to the
> > > Target DB's and for the RAC's I connect using SCAN and the service_name.
>
> > > The weird thing is that I only get this 17002 error every now and then...
> > > like once an Hour or so.
>
> > > Been searching Metalink, (Yes still using the term Metalink!!! :)  hate
> > the
> > > screwed up My Oracle Support eventhough they finally removed the Flash
> > > rubbish), but can't find any notes regarding this behaviour.
>
> > > In my test setup I have a 3 Node Cluster running an 11.2.0.3 Cluster.
>
> > > So, just wanted to make sure it's not an OpenBD Issue before I will open
> > an
> > > SR at Oracle...
>
> > > /Mats/
>
> > --
> > online documentation:http://openbd.org/manual/
> >  http://groups.google.com/group/openbd?hl=en
>
> --
> *Mats Strömberg*
> *NETWORK 23*
> *Oracle Tablespace Report (Open Source)*
> Project Homepage:www.project-otr.org
> 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/
 http://groups.google.com/group/openbd?hl=en

Reply via email to