<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can I insert/update my DB table with search result fields value through Splunk DB Connect? in Deployment Architecture</title>
    <link>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64015#M22385</link>
    <description>&lt;P&gt;Can dboutput be used for textbox values? Say if I have a DB table my_table with 3 columns A, B , C and I have 3 text fields on my splunk dashboard panel can I save the user entries in these text boxes to SQL database table similar to insert into my_table(A,B,C) values('text1','text2','text3'). Any help would be really appreciated!&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 13:20:04 GMT</pubDate>
    <dc:creator>anshu2812</dc:creator>
    <dc:date>2020-09-28T13:20:04Z</dc:date>
    <item>
      <title>Can I insert/update my DB table with search result fields value through Splunk DB Connect?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64007#M22377</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'd like to insert or update my table on SQL Server with using search results through Splunk DB Connect.&lt;/P&gt;

&lt;P&gt;I defined the following SQL Query for Database Lookups settings.&lt;/P&gt;

&lt;HR /&gt;

&lt;PRE&gt;&lt;CODE&gt;INSERT INTO table_name (column01, column02) VALUES ($value1$, $value2$)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;But I failed.&lt;BR /&gt;
So, I want to use a function like "mysqloutput" provided by "&lt;A href="http://splunk-base.splunk.com/apps/36664/splunk-mysql-connector" title="MySQLConnector"&gt;MySQLConnector&lt;/A&gt;".&lt;/P&gt;

&lt;P&gt;If not, I would appreciate your alternative ways to update my DB tables.&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2012 08:02:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64007#M22377</guid>
      <dc:creator>Suda</dc:creator>
      <dc:date>2012-12-14T08:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can I insert/update my DB table with search result fields value through Splunk DB Connect?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64008#M22378</link>
      <description>&lt;P&gt;The DB Connect app comes with a similar command, dboutput. There appears to be little documentation though &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; maybe you can gather at least some insight from the dboutput.conf.spec file.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2012 08:57:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64008#M22378</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2012-12-14T08:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: Can I insert/update my DB table with search result fields value through Splunk DB Connect?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64009#M22379</link>
      <description>&lt;P&gt;Thank you for your quick answer. I'll try to use "dboutput".&lt;/P&gt;</description>
      <pubDate>Fri, 14 Dec 2012 14:40:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64009#M22379</guid>
      <dc:creator>Suda</dc:creator>
      <dc:date>2012-12-14T14:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can I insert/update my DB table with search result fields value through Splunk DB Connect?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64010#M22380</link>
      <description>&lt;P&gt;Hi Suda,&lt;BR /&gt;
Please can you confirm whether you got the 'dboutput' command to work? I would also hugely appreciate an example of what your search and 'dboutput' statement looked like. I am very new to splunk and feeling my way through the process of getting some data out of splunk and into a MSSQL database.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 27 Dec 2012 09:01:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64010#M22380</guid>
      <dc:creator>bozza</dc:creator>
      <dc:date>2012-12-27T09:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Can I insert/update my DB table with search result fields value through Splunk DB Connect?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64011#M22381</link>
      <description>&lt;P&gt;I think .. "mysqloutput" command in MySQLConnector App have some issue.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;        1.  just put data into MYSQL DB table..
        2.  it can not control specfic field value using primary key.. 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;`               such as  "UPDATE OUTPUT set count=count('10') where IP='120.191.60.130'"&lt;/P&gt;

&lt;P&gt;As a Result, It can not control Key value.. using MySQLConnector, DBx App ..&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jan 2013 06:25:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64011#M22381</guid>
      <dc:creator>qkwltk</dc:creator>
      <dc:date>2013-01-01T06:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can I insert/update my DB table with search result fields value through Splunk DB Connect?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64012#M22382</link>
      <description>&lt;P&gt;Yes, of cource. I suceeded to use 'dboutput'.&lt;BR /&gt;
Before I test 'dboutput', I create my test table which has 2 columns; "source" and "sourcetype".&lt;BR /&gt;
I execute the following search command.&lt;BR /&gt;
index=_internal | dedup source sourcetype | head 5 | table source sourcetype | dboutput type=insert database=MsSQL table=dbx source sourcetype&lt;BR /&gt;
I can confirm 5 new entries on my MS SQL Server 2008.&lt;/P&gt;

&lt;P&gt;I hope it helps you.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2013 06:14:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64012#M22382</guid>
      <dc:creator>Suda</dc:creator>
      <dc:date>2013-01-10T06:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can I insert/update my DB table with search result fields value through Splunk DB Connect?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64013#M22383</link>
      <description>&lt;P&gt;Could you check 'README/dboutput.conf.spec'?&lt;BR /&gt;
I believe you can control how 'dboutput' works with your specified 'dboutput.conf' configurations.&lt;BR /&gt;
What is the key field? How to insert? How to update? You can control them, I believe.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2013 06:20:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64013#M22383</guid>
      <dc:creator>Suda</dc:creator>
      <dc:date>2013-01-10T06:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can I insert/update my DB table with search result fields value through Splunk DB Connect?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64014#M22384</link>
      <description>&lt;P&gt;I fail to use 'dboutput', when I specify my stanza defined in dbx/local/dboutput.conf.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2013 08:02:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64014#M22384</guid>
      <dc:creator>Suda</dc:creator>
      <dc:date>2013-01-10T08:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can I insert/update my DB table with search result fields value through Splunk DB Connect?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64015#M22385</link>
      <description>&lt;P&gt;Can dboutput be used for textbox values? Say if I have a DB table my_table with 3 columns A, B , C and I have 3 text fields on my splunk dashboard panel can I save the user entries in these text boxes to SQL database table similar to insert into my_table(A,B,C) values('text1','text2','text3'). Any help would be really appreciated!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:20:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64015#M22385</guid>
      <dc:creator>anshu2812</dc:creator>
      <dc:date>2020-09-28T13:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can I insert/update my DB table with search result fields value through Splunk DB Connect?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64016#M22386</link>
      <description>&lt;P&gt;Good morning,&lt;/P&gt;

&lt;P&gt;Following the above example I was able to write to my Oracle database, into the test table: dbx, using command:&lt;/P&gt;

&lt;P&gt;index=_internal | dedup source sourcetype | head 5 | table source sourcetype | dboutput type=insert database=Certlab_DMZViewer1 table=dbx source sourcetype&lt;/P&gt;

&lt;P&gt;But I would like to specify different tables within the same Oracle schema, and insert into these based on the dboutput.conf.spec  [&lt;NAME&gt;]  value. My understanding after looking at the spec, is that I can created different [&lt;NAME&gt;] sections, each tied to different ables. So I updated my dboutput.conf to include:&lt;/NAME&gt;&lt;/NAME&gt;&lt;/P&gt;

&lt;P&gt;[test_dbx_insert]&lt;BR /&gt;
database=Certlab_DMZViewer1&lt;BR /&gt;
table=dbx&lt;BR /&gt;
mode=insert&lt;BR /&gt;
fields=source,sourcetype&lt;/P&gt;

&lt;H1&gt;sql&lt;/H1&gt;

&lt;P&gt;advanced=false&lt;/P&gt;

&lt;P&gt;But My question is: how do I reference the 'test_dbx_insert' when calling the command: dboutput from the search web gui?  I do not see how to reference the specific name section in that command. Advice appreciated.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
M&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:54:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64016#M22386</guid>
      <dc:creator>mikefapex</dc:creator>
      <dc:date>2020-09-28T13:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can I insert/update my DB table with search result fields value through Splunk DB Connect?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64017#M22387</link>
      <description>&lt;P&gt;Documentation at: &lt;A href="http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/Commands#dboutput"&gt;http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/Commands#dboutput&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;For SQlite, i tried..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;-- Created a Sample in normal SQlite Command line to see if everything works
  CREATE TABLE [Genre]
    (
        [GenreId] INTEGER  NOT NULL,
        [Name] NVARCHAR(120)
    );

INSERT INTO [Genre] ([GenreId], [Name]) VALUES (1, 'Rock');
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;After installing Splunk DB connect, via Splunk Search I tried &lt;STRONG&gt;Select Query&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | dbquery "mySampleDB" "SELECT * FROM Genre" limit=1000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Output is&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;GenreId     Name
1       Rock
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Sample Insert Query&lt;/STRONG&gt; is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;*| head 1|eval GenreId=2 | eval Name="myOpera" | table GenreId,Name | table GenreId,Name| dboutput type=insert database=mySampleDB table=Genre GenreId Name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Selecting again:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dbquery "mySampleDB" "SELECT * FROM Genre" limit=1000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Output is now:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;GenreId Name
1       Rock
2       myOpera
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 29 Mar 2014 16:01:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Can-I-insert-update-my-DB-table-with-search-result-fields-value/m-p/64017#M22387</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2014-03-29T16:01:24Z</dc:date>
    </item>
  </channel>
</rss>

