All Apps and Add-ons

SQL query not returning any rows in DB connect splunk

dkgs
Communicator

Hello,

I have a query which works properly and returns value in MS SQL. But when the same query is executed via DB connect , its returning no rows returned.

Below is the sample of that query not the original one

SELECT * FROM (SELECT abc.row, abc.rsa, abc.desc, CASE WHEN resTyp = 'OBJECT' THEN objNa(abc.rsa) ELSE objNa(pt.OBJECT_ID) END AS objNa, abc.resTyp, abc.reqMod, abc.reqStat FROM sys.abc LEFT JOIN sys.pt ON pt.hobt_id = abc.rsa WHERE rsa > 0 AND resource_database_id = DB_ID('Database1')) as locks ORDER BY objNa

The same is returning rows in MS SQL not in db connect. Please help what is causing the issue in above query

Labels (2)
0 Karma

chli_splunk
Splunk Employee
Splunk Employee

Did you run this in search app? If yes, please check errors in search.log by inspecting search job. Thanks.

isoutamo
SplunkTrust
SplunkTrust

Hi

are you running those as same user on both way? Check which user is used in identity definition. 
r. Ismo

dkgs
Communicator

Hello @isoutamo ,

We are using the same user both way. All settings are the same.

 

0 Karma

isoutamo
SplunkTrust
SplunkTrust

Which version you have:

  • os
  • java
  • splunk
  • DBX
  • drivers
  • ms sql 

Have you a working connection and any working queries?

dkgs
Communicator

@isoutamo  Yes its a working connection and we have executed many queries which are working properly in db connect. But certain queries are not working like I have posted before and even the stored procedures are not working. The DB connect is installed in Enterprise Splunk .

0 Karma

isoutamo
SplunkTrust
SplunkTrust

Can you tell those version infos?

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 ...