Skip to main content
April 5, 2012
Question

How to connect Oracle 11g in CF9 using tnsnames

  • April 5, 2012
  • 3 replies
  • 3455 views

Hi, I'm using CF9 running on Solaris and I just had Oracle 11g installed using tnsnames. Can someone explain to me how to add the Oracle string in CF admin? I have confirmed that I can connect to the database but I don't think I have the correct syntax for connection string. I think it should be similar to the following: jdbc:datadirect:oracle:TNSNAMES_FILE=/d01/oracle/product/v.11.2.0.3_client/network/admin/tnsnames.ora:@dbserver.com:1549:SIDname;driver=oracle.jdbc.Oracle

Does anyone have an idea?

Thanks in advance

This topic has been closed for replies.

3 replies

Inspiring
April 6, 2012

I just checked my Oracle client, and my tnsnames.ora file doesn't have the database defined in it (just have the example database it in). 

I am running CF9 off of Windows, so I think we are talking apples and oranges, but I pulled this out of the neo-datasource.xml file (same formatas you showed above):

jdbc:macromedia:oracle://xxxxxxx.xxxx.xxx.com:1521;SID=yyyyyyyy;

so try  . . .

jdbc:macromedia:oracle:machinename:port;SID=sidname;

Inspiring
April 5, 2012

For my installation, we had to have the Oracle client installed onto the web server (because the Oracle database was not co-located on the server).  We also used the Oracle driver when setting up the datasource in the CF administrator.

April 6, 2012

I have Oracle client installed on the web server with Oracle database installed on separate server. When I add DSN and SID, I get the following error:

Connection verification failed for data source: dsn_test

java.sql.SQLNonTransientConnectionException:[Macromedia][Oracle JDBC Driver][Oracle]ORA-12505 Connection refused, the specified SID (SID_NAME) was not recognized by the Oracle server.

The root cause was that:java.sql.SQLNonTransientConnectionException:[Macromedia][Oracle JDBC Driver][Oracle]ORA-12505 Connection refused, the specified SID (SID_NAME) was not recognized by the Oracle server.

Any ideas?

Owainnorth
Inspiring
April 5, 2012

Don't you just add an Oracle DSN and put the SID into the correct field? Shouldn't need a connection string.

April 5, 2012

I think it needs more than that. CF9 needs to know how to connect to tnsnames.ora, just adding Oracle DSN isn't enough.