How to install the JDBC driver
Hello,
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.
Why?:crybaby:
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.
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.