Monday, August 9, 2010

Tip#28 Thin (JDBC) Vs Thick (OCI) Driver

JDBC Thin Vs OCI (Thick)

Loads of info available on what it means and which one to use etc etc. I just put two of the links which says it all,

Horse's Mouth : Oracle Document Link

Generally the Thin driver is the best choice. In most cases it is as fast or faster than the OCI driver (from 10.1.0), has almost exactly the same set of features, and is easier to administer.

In a few cases the OCI driver has slightly better performance. The OCI driver supports a few Oracle features better than the Thin driver.
The Thin driver is easier to administer since it does not require installation of the OCI C libraries.
The Thin driver will work on any machine that has a suitable Java VM, whereas with the OCI driver you must install the proper OCI C libraries for each machine.

We recommend using the Thin driver unless you must have one or more of the OCI only features, or until it is clear that the small performance gain provided by the OCI driver is worth the extra effort.

Thin Vs Thick Performance Test : Test Link

Final Word :

"The Thin driver clearly outperforms the OCI driver for every type of operation except executions of CallableStatement objects. On a Unix platform, my experience has been that the CallableStatement numbers are tilted even more in favor of the OCI driver. Nonetheless, you can feel completely comfortable using the Thin driver in almost any setting. The Thin driver has been well-tuned by Oracle's JDBC development team to perform better than its OCI counterpart."

Wednesday, August 4, 2010

Tip#27 Listener Log File Too Big

Over a period it is quite often you will see that listener.log in  ORACLE_HOME/network/log has grown to X GB in size.So how do we manage it ?

Do not have to stop the listener in order to delete the log files, just do the following

$> lsnrctl

LSNRCTL> set current_listener listener_name 
LSNRCTL> show log_file
LSNRCTL> set log_file xxx.log
LSNRCTL> show log_file
LSNRCTL> exit 
 
$> remove or backup the old listener.log