Reporting

Using DBQuery to update DB table data

kenchisho
Path Finder

I am using the "dbquery" command to update tables in MSSQL 2008.

The search is something like:

| dbquery test_db "UPDATE test_table1, test_table2 SET Data1='test1', Data2='test2', Status='Closed' WHERE AccountNumber='1234567890988'"

The inline search updates the database as expected. However the search provides no results which I can use to tell the user if it succeded or not.

The Job inspector shows a message... Update statement executed. 1 rows affected. Is it possible to display this message as a search result?

tachifelix
Path Finder

add select command after update like "select Data1, Data2, Status from test_table1, test_table2 where Status='Closed' and Data2='test2' and Data1='test1' "

Get Updates on the Splunk Community!

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...

September Community Champions: A Shoutout to Our Contributors!

As we close the books on another fantastic month, we want to take a moment to celebrate the people who are the ...

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...