Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

HOW TO UPGRADE ORACLE JDBC DRIVERS ON SOLARIS 10

Posted on 2011-10-10
23
Medium Priority
?
1,251 Views
Last Modified: 2013-12-27
Hello,

My supervisor is asking me to upgrade the oracle jdbc drivers on a production server (solaris 10).

I would like to know if there are any risks? Also , what is the procedure the step by step procedure to upgrade this drive?
0
Comment
Question by:cismoney
  • 9
  • 9
  • 4
22 Comments
 

Author Comment

by:cismoney
ID: 36950622
I need to install  Oracle Database 10g Release 2 (10.2.0.5) JDBC Drivers

ojdbc14.jar

http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-10201-088211.html


please helpppppppppppppppp
0
 

Author Comment

by:cismoney
ID: 36950637
I don't even know which command to type
0
 
LVL 2

Expert Comment

by:achellstrom
ID: 36950836
java -jar ojdbc14.jar.  
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Author Comment

by:cismoney
ID: 36954984
please give me another procedure
0
 
LVL 2

Expert Comment

by:achellstrom
ID: 36955130
What is your error message when you run that?  You may not have 'java' in your PATH variable or may not have java even installed on your machine. That means you would first have to download and install java.  Make sure the directory with java is in your PATH and that your CLASSPATH variable is properly set.
0
 

Author Comment

by:cismoney
ID: 36963403
here is the error that I get

bash-3.00$ ls
local.cshrc    local.login    local.profile  ojdbc14.jar
bash-3.00$ java -jar ojdbc14.jar 
Failed to load Main-Class manifest attribute from
ojdbc14.jar

Open in new window

0
 
LVL 2

Expert Comment

by:achellstrom
ID: 36963470
You probably need to set your CLASSPATH variable to include the directory where ojdbc14.jar is located
0
 

Author Comment

by:cismoney
ID: 36963480
do you know how?
0
 

Author Comment

by:cismoney
ID: 36963765
It's an upgrade. an old version of ojdbc is installed already. How can i find the classpath? where do I have to execute this driver?
0
 
LVL 47

Expert Comment

by:for_yan
ID: 36972395
Where do you need to upgrade the driver?
Do you have Java application which connects to  oracle?
Is it a web applicaction or normal (non-web) appliaction?

You need to replace tthe older driver in the classpath with ojdbc.jar
How you would do it depends on what kind of application are you upgrading.
Please, provide these details and we'll figure out how to do it.  
0
 
LVL 47

Expert Comment

by:for_yan
ID: 36972397

>on a  production server  (solaris 10)

What kind of java application serevr are you riuning kon Solaris - it it Tomcat, Weblogic ?
0
 

Author Comment

by:cismoney
ID: 36972996
@for yan :how can i find exactly which appplication server do  i have, and what are the different types?

I need to upgrade the driver on a server with solaris 10 . The upgrade is for oracle database. how do i find the classpath?

0
 
LVL 2

Expert Comment

by:achellstrom
ID: 36973095
What are the results of the following command in your ORACLE_HOME?
>cd $ORACLE_HOME
>find . -name '*jdb*jar'

0
 
LVL 2

Accepted Solution

by:
achellstrom earned 1400 total points
ID: 36973122
I believe all  you may need to do is have this jar file in the correct directory in your oracle home so it can be accessed.  On my database server it is in the ORACLE_HOME/owb/wf/lib/ojdbc14.jar directory, but I am using 11.2.0.2.  In my old oracle homes i.e. 10.2.0.4 the file is in the ORACLE_HOME/lib32/ojdbc14.jar directory, the $ORACLE_HOME/jdbc/lib32/ojdbc14.jar, and the $ORACLE_HOME/jdbc/lib/ojdbc14.jar  
I think that is all you need to do, so that Oracle can find it.  I don't think you actually even need to run the java command.
0
 

Author Comment

by:cismoney
ID: 36973160
in case there is an old ojdbc  jar file in ORACLE_HOME/owb/wf/lib/ , will i have to delete the old one to upgrade?
0
 
LVL 2

Expert Comment

by:achellstrom
ID: 36973245
I would just copy it under a new name like ojdbc14.jar_bak.  I never delete files if I don't have to. It makes for a really quick recovery if things go horribly wrong.  I would perform this in each directory where/if ojdbc14.jar exists, because in my old Oracle Homes I didn't do anything special to put ojdbc14.jar in any of the directories and they are in three different places. That means by default Oracle software must be looking for that jar file in each one of those locations.
0
 
LVL 47

Expert Comment

by:for_yan
ID: 36973384
you should try to uinderstand why you need to upgrade the driver and only then you can know how to do it. I can hardly imagine the situation where you want to replace jdbc driver inside ORACLE_HOME. Thios is usually internal Oracle business and when you upgrade Oracle to new version it will be upgraded if necessary. On the contrary if you are runing Java application server or servleet engine like say tomcat, that is quite understandable situation when you want to replace old oracle driver (say file classes12.zip) with the ojdbc14.jar (by the way, I believe this one seems to me not to be the latest).
In java app server you would normally need to replace the previos jar in some lib folder within the home of application server. If you find out what applicatioin server you are running on your machoine we can find the place where to put it.
Jdbc driver is in fact a piece of the code whoch java clients use to access oracle server. Older drivers may not allow to connect to newer oraclke server(s) which may or may not be sitting on the same hosat where you run the client - usually theey are different hoists). In suc situation you'll need ti uppgrade jdbc driver which is used by the client (and the client of Oracle database may be either stand alone java applicatioin or java sevlet engine which can run many servlest and they all usually go throiugh jdbc driver installed with this java servlet engine). The bottomline is you need to understand for what kind of java client you are upgrading the driver.
0
 
LVL 2

Expert Comment

by:achellstrom
ID: 36973772
This is for an Oracle 10.2.0.5 database not an application server, and if he got it from the http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-10201-088211.html it is the latest.  There should be no problems with this upgrade. It looks like a standalone process, and should be ok.  
0
 
LVL 47

Assisted Solution

by:for_yan
for_yan earned 600 total points
ID: 36974141

JDBC driver is NOT a database. This is the client-side piece of software, which is used by Java clients.
Oracle develops and distributes it because it connects to Oracle server.
Its upgrade as a rule is necessary for the clients (be those the web applaications running in the java application servere or java engine, or standalone
java applications which connect to Oracle and interact with oracle databse).

All oracle JDBC drivers are backward compatible, which means that later release of JDBC driver may connect and fully utilize the possibilities of all
version of databases which were released prior to the release of the driver, but sometimes it cannot connect to the newer releases of the database which
were released later (after the driver release) and almost certainly will not be able to utilize all options of the later database releases.

This is the link through which Oracle distributes older JDBC drivers which are not the latest and correspond to version 10 of Oracle database:
http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-10201-088211.html
and your file ojdbc4.jar is not the latest Oracle JDBC driver


The latest JDBC driver can connect and fully utilize the possibilities of the latest Oracle release, which is Oracle 11g.
It can be dopwnloaded form this page:
http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html
and the jar file with the latest jdbc driver is called ojdc6.jar

If your clients do not need to connect to the latest Oracle 11g you may live with ojdbc4.jar, still if you are replacing it now - it may be not a bad
idea to replace with the newer driver, because Oracle 11g becomes more and more popular (basically all new server installations are now of course 11g)
and JDBC drivers, as i mentioned are fully backwards compatible and are guaranteed to  work for with
your previous Oracle versions also.

If you happen to have Oracle database server installation on the same machine, it is not surprising that among many files in that
installation you can find jdbc driver, as significant parts of Oracle server are now java related and
Oracle uses jdbc driver for their internal use. And that would be somehwere in ORACLE_HOME area.
You can probably replace it there with the newer version. However, it is hard to understand what may be the purpose of
doing it. The stuff in ORACLE_HOME usually comes when you install database server and it is all consistent with the database version which is installed.

It is much more common situation when you need to upgrade jdbc driver on your client
because your client application now needs to connect to database of the higher version.
As you provided no details in your question, the most reasonable assumption is that you need to upgrade
JDBC driver on your client application (which at the same time can represent production java application server) which means you need to replace the file and make sure
that this file appears in your classpath, so that your client could access the classes of this new driver.
And with that comes the question of what kind of client you need to upgrade.


>oracle jdbc drivers on a production server (solaris 10).

by the way, solaris 10 is version of solaris operating system and this has nothing to do with Oracle server version
which may or may not be installed on this machine

I think before you do any changes in ORACLE_HOME you should still ask your supervisor what he/she meant about upgrading the driver - in particular
for what java application (or seems more probable for what java application server) the upgrade of the driver is necessary













0
 
LVL 2

Expert Comment

by:achellstrom
ID: 36974502
They are the latest drivers for his database 10.2.0.5 patch set if you look at the begining of this thread. His boss did not ask him to move the Oracle Home to 11g just to upgrade the jdbc drivers in the 10.2.0.5 Oracle Database Home.wistiles. The database comes with a full set of JDBC drivers there is an actual OHS version of the Apache server in every database Oracle Home also.  These are on the Oracle Home database for a reason. They could be using the database software just for its OHS, so they don't have to pay for the expensive application server licenses just as we do at our shop.  Then the middle teir comes with the Oracle Database software. If your shop only uses mod_plsql you don't need all the other expensive bells and   He is not using 11g, so he doesn't need those drivers. I already told him how to back it up, and how to get jdbc into the right directory.  They are just java class files.  It's not some big install.
0
 

Author Comment

by:cismoney
ID: 36977383
@achelstorm

please check the result of the output, how can i know that the upgrade is a success?

$ cd $ORACLE_HOME
$ ls
META-INF       local.cshrc    local.login    local.profile  ojdbc14.jar    oracle

Open in new window


$ cd ORACLE_HOME/owb/wf/lib/ 
ORACLE_HOME/owb/wf/lib/: does not exist

Open in new window



$ find . -name '*jdb*jar'
./ojdbc14.jar

Open in new window

0
 
LVL 2

Expert Comment

by:achellstrom
ID: 36978862
Can I assume thet the ojdbc14.jar that is in your Oracle Home is one you put there?  Your Oracle Home does not appear to be set up for the application server.  Are you using this Oracle Home for delivering your application? You do need to put it on your application server which in all likelyhood is on another machine.  I would find out what machine that is and then find out what version of middleware it has on it just as  for_yan recommended.  Then let me know what that application server is.
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month14 days, 17 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question