<?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: splunk dbconnect query issue in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/splunk-dbconnect-query-issue/m-p/196221#M56578</link>
    <description>&lt;P&gt;Try this:&lt;BR /&gt;
SELECT table_name as name, table_rows as rows FROM information_schema.tables&lt;BR /&gt;
 where table_name like 'smpp_queue%' or table_name like 'smppmessagedetailstemp%' and table_rows &amp;gt; 10&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 16:11:47 GMT</pubDate>
    <dc:creator>aelliott</dc:creator>
    <dc:date>2020-09-28T16:11:47Z</dc:date>
    <item>
      <title>splunk dbconnect query issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-dbconnect-query-issue/m-p/196218#M56575</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I m working on monitoring some mysql and mssql databases. All I need is a list of tables with number of rows in each one of them. I fired a database query in the database itself for the same purpose and it worked fine. When I fire the same query in splunk it shows syntactical errors.&lt;/P&gt;

&lt;P&gt;show table status where name like 'smpp_queue%' or name like 'smppmessagedetailstemp%' and rows &amp;gt; 10&lt;/P&gt;

&lt;P&gt;The above query doesnt work.&lt;/P&gt;

&lt;P&gt;Please help.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2014 11:49:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-dbconnect-query-issue/m-p/196218#M56575</guid>
      <dc:creator>bhavye20</dc:creator>
      <dc:date>2014-03-20T11:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: splunk dbconnect query issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-dbconnect-query-issue/m-p/196219#M56576</link>
      <description>&lt;P&gt;Hi bhavye20,&lt;/P&gt;

&lt;P&gt;did you enter this directly in the Splunk search field? If so, this will not work this way.&lt;BR /&gt;
If you want to query a DB with sql you need to do it like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dbquery "YourSQLDataBaseConnectionNameYouHaveConfiguredInDBConnect" "show table status where name like 'smpp_queue%' or name like 'smppmessagedetailstemp%' and rows &amp;gt; 10" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For more information please take a look at the docs of &lt;A href="http://docs.splunk.com/Documentation/DBX/1.1.3/DeployDBX/Commands"&gt;DBX commands&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2014 13:18:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-dbconnect-query-issue/m-p/196219#M56576</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-03-20T13:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: splunk dbconnect query issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-dbconnect-query-issue/m-p/196220#M56577</link>
      <description>&lt;P&gt;Is there anything in your dbx.log file?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2014 14:51:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-dbconnect-query-issue/m-p/196220#M56577</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-03-20T14:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: splunk dbconnect query issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-dbconnect-query-issue/m-p/196221#M56578</link>
      <description>&lt;P&gt;Try this:&lt;BR /&gt;
SELECT table_name as name, table_rows as rows FROM information_schema.tables&lt;BR /&gt;
 where table_name like 'smpp_queue%' or table_name like 'smppmessagedetailstemp%' and table_rows &amp;gt; 10&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:11:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-dbconnect-query-issue/m-p/196221#M56578</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2020-09-28T16:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: splunk dbconnect query issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-dbconnect-query-issue/m-p/196222#M56579</link>
      <description>&lt;P&gt;That works for me except I had to use table_name and table_rows in the where clause.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:11:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-dbconnect-query-issue/m-p/196222#M56579</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-09-28T16:11:49Z</dc:date>
    </item>
  </channel>
</rss>

