Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links

How to install the JDBC driver

Software Development

Thread Tools Search this Thread
Old 11-05-2009
Join Date: Apr 2009
Posts: 49
How to install the JDBC driver


I had downloaded and installed the "SQL Server Management Studio Express" on my home PC.
I connect with:
server name: ESA-SAV01 \ sqlexpress
Authentication: Windows Authentication

So without a password.
I can connect, create tables etc.....

I coded a small java program to connect to the SQL database using JDBC with Java.

In "Administrative Tools" / "Data Sources (ODBC)" then in "User Data Source" I click on the add button, then on the "Create New Data Source", I see at the end "SQL server",and there I click on SQL Server.
Then a new window opens. There I met a name like "MyDataSource" for the name. In Server and I see "ESA-SAV01" or Local if I click on one or the other,another window opens and then I check with windows NT authentication for the network login ID after some try, I get the message that tells me that SQL Server does not exist.
even if I click on another option.


Reply With Quote
Old 11-05-2009
Join Date: Apr 2008
Posts: 193
Re: How to install the JDBC driver

I have checked and am saying that in the version 3.2, all the JARS present in the %TOMCAT_HOME%/lib directory are automatically appended to Tomcat's classpath, but only the jars are appended. and if you wanted to append a ZIP file you will have to rename it to *.jar ( as a jar is only a renamed zip )

With the two other options you could achieve this:

Put the jar file in your webapplications WEB-INF/lib/ directory. But keep in mind that this set of JARs will only be added to the classpath for your webapplication only.Note if a different driver for the same JDBC URL is already available then the system classpath, then it may happen that it would be loaded instead of earlier one.

You may change the Tomcat CLASSPATH environment variable, or else you could "-classpath" command-line option, to contain your JAR or ZIP. This is set in the Tomcat startup script, tomcat.bat/tomcat.sh.
Reply With Quote
Old 11-05-2009
Join Date: Dec 2008
Posts: 202
Re: How to install the JDBC driver

Download the following files such as db2jcc.jar and db2jcc_license_cu.jar in order to make your apps talk to DB2 database It is also available at IBM web site.

Once you have downloaded these files keep those files in your local lib folder under your application root folder -- i.e you will be having a lib folder under WEB-INF folder so put these two files in it.

The command to run on command prompt is CLASSPATH = /appRoot/WEB-INF/lib or add this line to your .bashrc file.You can try with this class Class.forName("COM.ibm.db2.jcc.DB2Driver"); instead of Class.forName("COM.ibm.db2.jdbc.app.DB2Driver"); Proper installation will Install the JDBC driver files.
Reply With Quote

  TechArena Community > Software > Software Development
Tags: , , ,

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads for: "How to install the JDBC driver"
Thread Thread Starter Forum Replies Last Post
JDBC Driver for Open Office Base Rivan Software Development 5 21-07-2010 05:18 AM
How to install the DB2 JDBC driver with Jython Liliana Software Development 4 21-02-2010 03:19 AM
Types of different JDBC driver in JAVA technology GunFighter Software Development 3 11-09-2009 02:11 PM
How to use Transaction Management in JDBC VinFanatic Software Development 3 25-04-2009 12:39 PM
How JSP call JDBC database connection Swetlano Software Development 3 28-02-2009 12:46 PM

All times are GMT +5.5. The time now is 03:11 AM.