Archive | Oracle RSS feed for this section

ColdFusion and Oracle settings for Idle timeout and SQLDeveloper

Over at the ColdFusion Muse by Mark Kruger he posted an interesting blog entry titled “Coldfusion and Oracle 8i Performance”. It is an interesting read and shows how important it is to fine tune any Enterprise system.

To see all the defined parameters and other settings we like to recommend the use of Oracle’s own SQLDeveloper application. It is a great tool, not only for setting up tables, but for reporting as well. In my works with other developers I have seen that many people don’t know the report functionality of SQLDeveloper.

With the Reports one is able to fine tune all the parameters of the Oracle database and also see the connected users, see the most used SQL’s and other things. Here is a screenshot of the “All Parameters” of the Reports.

Oracle SQL Developer _ All Parameters.png

This is taken from the current 1.2.x release of SQLDeveloper which is available for free. You can also define your own reports and have them spiced up with some nice graphics. To read more about it I suggest you head over to the product side of SQLDeveloper.

Comments { 52 }

Installing Oracle database 11g should not be a nightmare, right?

Ok, first of I want to say that I have installed quite a couple of Oracle database releases and that I am not a newbie to this, but today I feel like one. Why? Well, simply put, I don’t understand how Oracle can release a product that is full of bugs and misplaced links. Anyhow, let’s get started:

Yesterday we thought of installing the latest and greatest Oracle database 11gR1 release on our brand new shiny Linux box. As always we are using the brilliant CentOS 5. We then went ahead and did step by step according to the installation instructions of this Oracle guide to install 11g on Linux.

All went fine until the Database Configuration Assistance came up with an error that it can not install properly. It also said that this is not so bad as one can run the installation manually later on. We have had these errors in the past and know how to handle them. Thus we continued. After that the database was setup fine.

Actually all went fine, we could login to the database without a problem and all is set. Well that means, the database was running, but no the listener! More to that later on.

We then configured the system to start the Oracle services automatically on reboot. For that we used another Oracle Guide that is supposed to state the correct settings. The problem is that it does NOT work as stated in their document!

First thing is to go into “# vi /etc/oratab” and edit the last line of the string to change it to a “Y” instead of the “N”. No problem, but it gets problematic when you are trying to use the “dbora” script. Because as soon as you are trying “/sbin/chkconfig –level 345 dbora on” (this has to be done on CentOS/RedHat) you will get an error like “service dbora does not support chkconfig”. How come?

To make the script “dbora” work on CentOS/RedHat you will want to include this at the top of the document:

#!/bin/sh
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.

The important part here is to have the line “chkconfig” AND “description” in the file. Otherwise “chkconfig” will not work! Ok, on with the show.

Still after reboot the database does not come up as expected. Digging around some more, we found that the script “dbstart” has another bug. This line:

# First argument is used to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=$1

does NOT work! As soon as one changes it to the actual path of the installation the script runs much better. So go ahead and change it to:

# First argument is used to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=/opt/oracle/product/11.1.0/db_1

Of course, our Oracle installation is under “/opt”, change this to your installation path. Some have posted in blogs and forums that you could also change it to “$ORACLE_HOME” but we have had no success with that only the hard coded path value does work.

Fun, isn’t it? But wait there is more and make sure to read until the end of this post. Next up is not really something that os Oracle’s fault, but never the less not stated anywhere. To make working in the shell more comfortable and that the scripts DO work you will want to modify your “profile” settings.

Fire up “vi” and edit “/etc/profile” and add the following lines (change it to fit your path and SID):

PATH=$PATH:/opt/oracle/product/11.1.0/db_1/bin
ORACLE_HOME=/opt/oracle/product/11.1.0/db_1/
ORACLE_SID=orcl
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC ORACLE_HOME ORACLE_SID

Ok, after you have done all of the above you can safely restart your machine and your Oracle database should start automatically. If it does not then a “dbca” could help. but wait, I kept the best for the end!

In our installation we have found that with the scripts above any local login to the sqlplus console reports us that we are connected to an idle instance! But, now get this, my users can login to the database with SQL-Developer or any remote client!!! Don’t believe us, here is the screen shot of the local login:

oracle11g.png

Only this “little” thing kept us quite busy for today and it is leaving a feeling that Oracle database 11gR1 might not be so ready for big time yet. But maybe we are doing something wrong? Let us know, we are welcome to suggestions.

Comments { 57 }

Configure the JDBC driver for Oracle on ColdFusion 8 Standard Edition

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.

ColdFusion Administrator.png

Comments { 116 }

Oracle acquired BEA Systems

Don’t know what is going on today, but Sun acquires MySQL and now Oracle announced that it finally acquired BEA Systems!

Oracle pays 19,375 Dollar per share this time. Ellison said in the past that 17 Dollar per share would still be too much to pay for BEA Systems.

Comments { 15 }