Hi All,
I am unable to connect to a custom database using JDBC type4 driver. Please find the configurations I made on db_connection_types.conf file in splunk DB connect app.
> [t4sqlmx] displayName = HP NonStop SQL
> serviceClass =
> com.splunk.dbx2.DefaultDBX2JDBC
> jdbcUrlFormat =
> jdbc:t4sqlmx://<host>:<port>/
> jdbcDriverClass =
> com.tandem.t4jdbc.SQLMXDriver port =
> 18650
I have made this changes in the local directory and restarted. But after restart when I'm trying to make a connection, The connection is not happening.
It will be great if any help or suggestions to resolve this issue.
Thanks,
S
Not entirely sure but do you need a database variable in your jdbcUrlFormat?
jdbcUrlFormat =
jdbc:t4sqlmx://<host>:<port>//<database>
based on http://docs.splunk.com/Documentation/DBX/3.1.2/DeployDBX/databasespec
[mysql] displayName = MySQL
serviceClass = com.splunk.dbx2.MySQLJDBC
jdbcUrlFormat =jdbc:mysql://<host>:<port>/<database>
I think we can set it in later state while making the connections. I tried the solution provided by you But still no luck.
Thanks,
S
I found a doc on a similar question:
Around page 24 it mentions:
Establishing the Connection
The DriverManager.getConnection method accepts a string containing a Type 4 driver URL.
The JDBC URL for the Type 4 driver is:
' jdbc:t4sqlmx://ip_address|machine_name:port_number/[:][property=value [;property2=value2]...]
property=value and property2=value2; specify a Type 4 driver property name-property
value pair. The pairs must be separated by a semicolon (;). For example,
T4LogLevel=ALL;T4LogFile=temp1.log
To establish a connection, the JDBC application can use the following code:
> Class.forName("com.tandem.t4jdbc.SQLMXDriver"); //loads the driver
> String url = “jdbc:t4sqlmx://ip_address|machine_name:port_number/”
> Connection con = DriverManager.getConnection(url,“userID”, “Passwd”);
The variable con represents a connection to the MXCS data source that can be used to create and
execute SQL statements.
So I wonder if you need something like:
jdbc:t4sqlmx://<host>:<port>/:
Yes you are right. If you see my previous post, I already provided the same url and tested. But after performing the steps also unable to connect to the db. When i analysed the log I found driver unable to load. So don’t get any solution.
Hmm well sounds like your URL is working then. I saw a previous question similar to this one where the user put the driver in the wrong location, is your jdbc driver in this location?
$SPLUNK_HOME/etc/apps/splunk_app_db_connect/drivers
Yes, the driver t4sqlmx is located in that path.