Recently we’ve been moving quite a few servers and databases into our new datacenter, so I’ve been having to learn – more quickly than usual – about the often obscure differences between older and newer versions of various software including Solaris and Oracle Database.
A change to an Oracle RAC system caused the most interesting trouble I’ve had so far during this move.
In ColdFusion 11, there are native JDBC drivers for Oracle that are normally selected in the Data Source Management page using the logical and expected “Oracle” selection.
However, I was chagrined to find out that if you use this to try to connect to an Oracle Database that is load balanced with RAC, this selection will not work. Upon trying to connect, you will receive the error:
“[Macromedia][Oracle JDBC Driver][Oracle]ORA-12505 Connection refused, the specified SID (whatever string you put in the SID field) was not recognized by the Oracle server”
Neither Oracle nor Adobe documentation was much help on this. Fortunately, I came across a thread on the Adobe forum where a user was having this problem.
The answer is to, instead of selecting “Oracle”, select “other” in the Driver drop-down list. Then, use this connection string. The last variable (AlternateServers), appears to be optional. I’m not certain whether or not the IP addresses also need to be enclosed in parentheses.
jdbc:macromedia:oracle://(ORACLE SERVER):1521;SERVICENAME=(serviceName);sendStringParametersAsUnicode=false;MaxPooledState ments=1000;AlternateServers=((IP ADDRESS1),(IP address 2))
This is basically how I ended up setting the connection up: