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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...