Oracle 19c connecting to ColdFusion 2018

Viewed 1273

ColdFusion 2018 on Windows 2016 Server, currently using Oracle 12c.

My institution is planning an Oracle upgrade to 19c, I have found nothing in the CF documentation about connections to a 19c database.

Has anyone done this? Any issues I should know about? Our CF install is up to date.

Thank you,

Michelle

2 Answers

Actually, for the built-in Oracle database drivers, if you leave the SID blank and add the following to your Connection String it should work:

ServiceName=myoracle.service.name;

In my shop, we switched over to Oracle 19c which was a pain because every Oracle datasource needed to be recreated again only differently. If during your upgrade from 12c to 19c, your shop switched from using a SID to a SERVICE_NAME then the native Oracle driver will no longer work since there's no entry for the SERVICE_NAME on the create datasource screen. Instead, you must create the datasource using "Other" for the driver and then use the jdbc thin client. Here are the values you will need to plug in.

Firstly, you may need to download the Oracle thin driver from Oracle's website. I'm not sure on this because we have another team that manages the server.

Driver Class: oracle.jdbc.OracleDriver

Driver Name: ojdbc.jar

JDBC URL: Go to your tnsnames.ora file and copy and paste the entry in the CF Admin create datasource screen. However you will replace the DATABASE.WORLD= with jdbc:oracle:thin:@ and keep the rest of the entry the same. So for example, if you had a TNS entry that reads:

MYDB.WORLD=(DESCRIPTION=(ADDRESS=(COMMUNITY=TCP.WORLD)(PROTOCOL=TCP)(HOST=HOSTNAME)(PORT=2727))(CONNECT_DATA=(SERVICE_NAME=MYDB)))

Then your JDBC URL would read

jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(COMMUNITY=TCP.WORLD)(PROTOCOL=TCP)(HOST=HOSTNAME)(PORT=2727))(CONNECT_DATA=(SERVICE_NAME=MYDB)))

Lastly, you can go here for similar but somewhat different information.

Related