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!

Splunk Enterprise Security: Your Command Center for PCI DSS Compliance

Every security professional knows the drill. The PCI DSS audit is approaching, and suddenly everyone's asking ...

Developer Spotlight with Guilhem Marchand

From Splunk Engineer to Founder: The Journey Behind TrackMe    After spending over 12 years working full time ...

Cisco Catalyst Center Meets Splunk ITSI: From 'Payments Are Down' to Root Cause in ...

The Problem: When Networks and Services Don't Talk Payment systems fail at a retail location. Customers are ...