Tuesday, June 19, 2012

Configure WebSphere DataPower SQL Data Source with Oracle Real Application Clusters (RAC)

I've been banging my head lately trying to figure out how I would configure an SQL Data Source for DataPower for this Oracle connection string:

MYDB =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (LOAD_BALANCE = yes)
      (ADDRESS = (PROTOCOL = TCP)(HOST = MYDB01)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = MYDB02)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = mydb.mycompany.com.ph)
      (FAILOVER_MODE =
        (TYPE = SELECT)
        (METHOD = BASIC)
        (RETRIES = 180)
        (DELAY = 5)
      )
    )
  )

Since I don't know anything about Oracle, I have no idea how to use this connection string for DataPower. I do know, however, how to configure an SQL Data Source given an Oracle SID at a single database host. But, since the connection string given to me is a "load balanced" one, I didn't know anymore how to configure a data source for that.

I did a little research and found the following;

I overlooked them quite many times simply because I do not know what Oracle Real Application Clusters mean. I did some reading on them but I wasn't sure if it was what the client is using. I did more readings until finally, I had to ask the only question left unanswered: "Are we using Oracle Real Application Clusters for this?". And, when the answer was a definitive 'YES', I knew by then that the solution was just under my nose.

I followed the steps mentioned in the first link but after saving my configuration my log messages indicate:

Connection error message: Unicode converter truncated character


I then checked the second link at pages 10-11 and noticed that the AlternateServers value here was enclosed in parenthesis. I tried that again and, voila, it worked!

Here's my final configuration:



This situation reminded me of what one of our IT Architects told me when I was still very new in IBM:
Never hesitate to ask questions, it will save you a lot of time
 Now, I have something to add to that saying:
Ask the right question and you'll get the answer you seek.

No comments: