All Apps and Add-ons

Splunk DB connect 3 is not accepting custom db configurations for SQL/MX database.

soumyacharya91
Path Finder

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

0 Karma

hos_2
Path Finder

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>

soumyacharya91
Path Finder

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

0 Karma

hos_2
Path Finder

I found a doc on a similar question:

https://support.hpe.com/hpsc/doc/public/display?sp4ts.oid=4201303&docId=emr_na-c03465685&docLocale=e...

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>/:

0 Karma

soumyacharya91
Path Finder

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.

0 Karma

hos_2
Path Finder

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

0 Karma

soumyacharya91
Path Finder

Yes, the driver t4sqlmx is located in that path.

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...