Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to connect Oracle 11g in CF9 using tnsnames

Guest
Apr 05, 2012 Apr 05, 2012

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

TOPICS
Database access
3.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Apr 05, 2012 Apr 05, 2012

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 05, 2012 Apr 05, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 05, 2012 Apr 05, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 06, 2012 Apr 06, 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 06, 2012 Apr 06, 2012
LATEST

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;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources