Tuesday, March 16, 2010

Configure the JDBC driver for Oracle on ColdFusion 8 Standard Edition

This articel is from http://blog.sixsigns.com/2008/01/25/configure-the-jdbc-driver-for-oracle-on-coldfusion-8-standard-edition/
Thank you.

We have had a lot of people asking us if they could use the Oracle database with their ColdFusion Standard Edition. Of course, Adobe would prefer to sell you the Enterprise Edition for using Oracle, but fortunately ColdFusion is based on Java and thus we can use the free and existing Oracle JDBC Driver.

Note: If you do go with the Oracle JDBC “Thin Client” option you will NOT be able to return result sets from stored procedures. So, if you depend upon PL/SQL stored procedures for returning queries, then you will be out of luck without the ColdFusion Enterprise Edition. On the other hand one could also buy the same JDBC drivers as Adobe is using from DataDirect.

Now, before you will be able to use the JDBC Driver you will need to download the appropriate JDBC Oracle Driver. Make sure, that you download the correct driver for the correct version of your database. They are not all the same! Also, download the “ojdbc14.jar” file, since this is for the JDK 1.4 and JDK 1.5.

Grab the “ojdbc14.jar” file and copy/move it to “ColdFusion8/wwwroot/WEB-INF/lib”. Once done, you will need to restart the ColdFusion Server.

Go the the ColdFusion Administration and go to your “data sources”. Add a new “data source” and choose “Other” from the Database driver options.

On the following page enter “jdbc:oracle:thin:@10.10.10.11:1521:ORCL” in the “JDBC URL” Textarea. In the “Driver Class” textfield enter “oracle.jdbc.OracleDriver”. Of course, enter your username and password. Once done you should connect to your Oracle database without fail.

Here is a screenshot to visualize the above.




No comments: