Security

Error in DB2 connectivity with splunk DB2

jimjohn
Path Finder

When i try to configure a connection to DB2 using splunk DB connect i am getting below exception.
I have coped db2jcc4.jar in the folder...\Splunk\etc\apps\dbx\bin\lib.I am using windows 7 64 bit machine.

Encountered the following error while trying to save: In handler 'databases': Error validating database: com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-142, SQLSTATE=42612, SQLERRMC=null, DRIVER=4.16.53

dwaddle
SplunkTrust
SplunkTrust

What type of DB2 database is it? The error codes suggest it is DB2 on Z/OS, and you (or DBX) are attempting to run an SQL statement that is not supported.

-142

THE SQL STATEMENT IS NOT SUPPORTED
Explanation

An SQL statement was detected that is
not supported by the database. The
statement might be valid for other
IBM® relational database products or
it might be valid in another context.
For example, statements such as VALUES
and SIGNAL or RESIGNAL SQLSTATE can be
used only in certain contexts, such as
in a trigger body or in an SQL
Procedure.

I would take a guess that Splunk DBX is attempting to use an SQL VALUES statement like VALUES CURRENT TIMESTAMP or VALUES 1 to validate database connectivity, and this does not work with DB/2 for Z/OS.

This looks like the same issue:

http://answers.splunk.com/answers/117024/splunk-db-connect-db2

Use one of the solutions provided there, like defining a new database type just for z/OS.

0 Karma

jimjohn
Path Finder

Thanks ,
I am able to connect with DB with the solution.

0 Karma

mgranger1
Path Finder

I'm having the same problem, and while the fixes mentioned in the linked post seemed to clear things up for DB Connect 1.x, it doesn't seem to be working for DB Connect 2.x. Anyone have any thoughts?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...