Installing JDBC driver on Linux
Note
The ODBC and JDBC client drivers are installed by the server .rpm
files. If you have installed Vertica on your Linux system for development or testing purposes, you do not need to download and install the client drivers on it—you just need to configure the drivers. To use ODBC, you need to create a DSN (see Creating an ODBC DSN for Linux). To use JDBC, you need to add the JDBC client driver to the Java CLASSPATH (see Modifying the Java CLASSPATH). (The JDBC client driver is not available on FIPS-compliant systems.)
For details, see Supported platforms.
The JDBC driver is available for download from the Vertica driver downloads page. There is a single .jar
file that works on all platforms and architectures. To download and install the file:
-
Open a Web browser and go to the Vertica driver downloads page.
-
In section that corresponds to your version of Vertica, click the link for the JDBC driver.
-
You need to copy the
.jar
file you downloaded to a directory in your Java CLASSPATH on every client system with which you want to access Vertica. You can either:-
Copy the
.jar
file to its own directory (such as/opt/vertica/java/lib
) and then add that directory to your CLASSPATH (recommended). See Modifying the Java CLASSPATH for details. -
Copy the
.jar
file to directory that is already in your CLASSPATH (for example, a directory where you have placed other.jar
files on which your application depends).
-
Note
In the directory where you copied the.jar
file, you should create a symbolic link named vertica_jdbc.jar
to the .jar
file. You can reference this symbolic link anywhere you need to use the name of the JDBC library without having to worry any future upgrade invalidating the file name. This symbolic link is automatically created on server installs. On clients, you need to create and manually maintain this symbolic link yourself if you installed the driver manually. The Installing the client RPM on red hat and SUSE create this link when they install the JDBC library.