[Aurora-sparc-user] Oracle client?
Rob Seward
rseward at bluestone-consulting.com
Thu Sep 7 12:39:39 EDT 2006
Hello,
It has been two years since I have had a working aurora box. So these details
are from memory.
Download and install a Java Development Kit from http://www.blackdown.org/
JDK-1.4.1 seems to be the most recent JVM for the sparc platform. In order to
install and use this JVM you may need to install the compat g++ and gcc libs.
This JVM seems to be from late 2003, not a good sign for Sparc Linux.
I like to install the jdk to /usr/java/jdk-1.4.1.
All the scripting commands in these instructions assume bash is the shell.
Set a environment var to reference this directory
export JAVA_HOME=/usr/java/jdk-1.4.1
I like to put such environment vars into a /etc/java.conf file.
Add the java binary on your path.
export PATH={$JAVA_HOME}/bin:$PATH
I put this statement into the /etc/java.conf file as well.
In the user shell / script that requires access to Java I source this file.
. /etc/java.conf
A good test of the JVM functioning is
java -version
or
$JAVA_HOME/bin/java -version
java should be found on your path and display some version information.
Once you have a working JVM, the rest is standard Java / JDBC steps.
Download a recent Oracle JDBC driver from Oracle technet or excavate a copy
from $ORACLE_HOME/jdbc directory on your server.
This JDBC driver needs to be in the CLASSPATH of the program that uses JDBC
driver.
At this point you can write custom Java code to access the database or use a
pre-existing Java / JDBC program to connect to Oracle.
My favorite generic JDBC query programs are:
SquirrelSQL - a GUI based Java query tool for doing interactive querying of
the database.
Henplus - a command line based query tool. Excellent for cross-platform
automation of Database tasks. Henplus is a lot like sqlplus.
It happens to be a good interactive tool as well, if you are
an old school database person.
What I like best about SquirrelSQL and Henplus tools is that they allow me to
connect to any database that has a JDBC driver. This includes but is not
limited to:
Oracle
MS-SQL
MySQL
Postgres
Sybase
DB2
Access (on Windows)
I can use the same familar set of tools to interact with the database across
many platforms and database. No need to re-learn a new tool for a new database
/ platform.
I can give an example of a extremely simple JDBC program that connects to
Oracle and fetches database information. But there are many good sites that
describe writing JDBC programs better than I could.
I hope this helps. Please contact me again if you want me to waffle on more
about JDBC.
Best of Luck,
Rob
--
Open WebMail Project (http://openwebmail.org)
More information about the Aurora-sparc-user
mailing list