Splunk® DB Connect

Deploy and Use Splunk DB Connect

Download manual as PDF

NOTE - Splunk DB Connect version 1.x reached its End of Life on July 28, 2016. Please see the migration information.
This documentation does not apply to the most recent version of DBX. Click here for the latest version.
Download topic as PDF

Install database drivers

Many Splunk DB Connect supported databases are preconfigured and require only that you add a database connection and define inputs for that database.

But if you wish to connect a MySQL, Oracle, DB2, or Informix database to Splunk via Splunk DB Connect, you must download and install the correct JDBC drivers as shown below.

Step 1: Download driver

Download the appropriate JDBC driver for your database, as follows:

  • MySQL
    • Download the MySQL Connector/J driver, version 5.1.24 or later (mysql-connector-java-*-bin.jar).
    • Download and uncompress either ZIP or TAR archive files. The uncompressed archive contains the JDBC driver (.jar).
    • Copy the mysql-connector-java-version-bin.jar file to the $SPLUNK_HOME/etc/apps/dbx/bin/lib directory.
  • Microsoft SQL Server
    • There are two JDBC driver options for Splunk DB Connect and Microsoft SQL Server. The better option is Microsoft's own JDBC Driver. To enable Microsoft SQL Server connections, download and install the Microsoft JDBC Driver for SQL Server.
      • Go to the Microsoft JDBC Drivers 4.1 and 4.0 for SQL Server download page and click Download.
      • On the Choose the download you want page, select the checkboxes next to the appropriate download: sqljdbc_4.0.2206.100_enu.tar.gz for Linux, Unix, and OS X; sqljdbc_4.0.2206.100_enu.exe for Windows. Be sure to download version 4.0 of the driver, and then click Next.
      • Expand the file you just downloaded.
      • From inside the sqljdbc_4.0 directory, copy or move the sqljdbc4.jar file to the $SPLUNK_HOME/etc/apps/dbx/bin/lib directory.
        Note: Do not copy the sqljdbc.jar file. It is not needed and will cause problems if installed alongside the sqljdbc4.jar file.
  • Oracle
  • DB2
    • Go to the DB2 JDBC Driver Versions download site.
    • Login (register, if needed). As part of the login, check the license agreement checkbox, then click the I confirm button.
    • Check the download checkbox for:
      IBM Data Server Driver for JDBC and SQLJ (JCC Driver)
      ibm_data_server_driver_for_jdbc_sqlj_v10.5.zip (9 MB)
    • Click the Download now button, saving the file to a temporary directory.
    • Unzip the downloaded file.
    • Copy or move the db2jcc4.jar file to the $SPLUNK_HOME$/etc/apps/dbx/bin/lib directory.
    • Note: Only move the db2jcc4.jar file to the .../dbx/bin/lib directory, not sqlj.zip, to avoid conflicts.
    • See Installing and Connecting to Clients for additional information.
  • Informix

Step 2: Install driver

After you have downloaded the correct driver for your database and platform, install the driver as follows:

  1. Copy the driver to the $SPLUNK_HOME/etc/apps/dbx/bin/lib directory.
  2. Restart Splunk.

Adding a database that is not in the list of Supported Databases

If you want to connect to a database that is not in the list of Supported Databases, see Add a database for instructions.

PREVIOUS
Install Splunk DB Connect
  NEXT
Add a database

This documentation applies to the following versions of Splunk® DB Connect: 1.0.6, 1.0.7, 1.0.8, 1.0.9, 1.0.10, 1.0.11, 1.1, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.1.7, 1.2.0, 1.2.1, 1.2.2


Comments

Hi Sogeniusio, Thanks very much for your comment. As it stands, this version of DB
Connect (versions 1.x) has reached its end of life as of July 28, 2016 and
is no longer a product that Splunk supports or updates. If you are willing
and able, you can download and use the newest version of DB Connect,
Version 3.1.1.

Jrevell splunk, Splunker
October 19, 2017

These instructions are a bit outdated. Looks like for the most recent versions of DB Connect you'll need to place your drivers within the $SPLUNK_HOME\etc\apps\splunk_app_db_connect\drivers directory. Simply place the files above into that directory.

Sogeniusio
October 6, 2017

Oh, it looks like the db connect 2 drove me to the wrong version page. disregard previous comment regarding path.

Mikelanghorst
June 1, 2016

@Sideview: Thanks, I've removed the platform-specific instructions, since they're all the same now. Also updated the corresponding docs for DBX2.

Mtevenan splunk, Splunker
May 2, 2016

fyi -the mysql connector for the last 6months or more, has shipped only as a platform independent tar or zip - the old msi option is gone. Just a tiny thing to update.

Sideview
May 2, 2016

Hi. DB Connect ships with the jtds-1.2.6.jar driver for MS SQL. To upgrade, you can replace the current .jar in the $SPLUNK_HOME/etc/apps/dbx/bin/lib directory with a later version. Keep in mind that we have not tested later versions of the driver.

Sroback splunk
September 3, 2014

Are there any official instructions on how to install/upgrading the MS SQL drivers?

AvianFLU
September 2, 2014

I copied the jar file for oracle to mentioned path C:\Program Files\Splunk\etc\apps\dbx\bin\lib. Still getting the error Encountered the following error while trying to save: In handler 'databases': JDBC driver (oracle.jdbc.OracleDriver) for database type Oracle is not installed.<br />Pls help

Pravinsanadi
June 24, 2014

Bohrasaurabh, <br /><br />We've added the "Platform Independent" option to the MySQL JDBC driver install instructions. Thanks!

Sroback splunk
December 9, 2013

For MySQL, you can download the Platform Independent Connector version from the drop down which has the required jar file when you unzip it.

Bohrasaurabh
December 9, 2013

Thanks. We've updated the instructions to include the installation of the MySQL JDBC driver for Windows (.msi) file.

Sroback splunk
December 2, 2013

The MySQL JDBC driver for Windows is as an .msi file. Download this file and run it. This will install the JDBC driver (.jar) in C:\Program Files\MySQL\MySQL Connector. Then just copy the mysql-connector-java-version-bin.jar file to the $SPLUNK_HOME/etc/apps/dbx/bin/lib directory.

Ti786
December 1, 2013

Just realized that I forgot to post the link, is it ojdbc14.jar?<br /><br />http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-10201-088211.html

Bohrasaurabh
October 25, 2013

We have Oracle 10g Enterprise Edition 10.2.0.2.0 running, what will be the recommended ojdbc driver?

Bohrasaurabh
October 25, 2013

Potatok, we've updated this topic to point out the exact files needed from the driver packages, hope this helps.

Rachel, Splunker
March 20, 2013

still having problem... what files are actually needed under /etc/apps/dbx/bin/lib? may I have a simple example?

Potatok
March 19, 2013

Was this documentation topic helpful?

Enter your email address, and someone from the documentation team will respond to you:

Please provide your comments here. Ask a question or make a suggestion.

You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters