<?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 how to write dbquery in search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-write-dbquery-in-search/m-p/157219#M185797</link>
    <description>&lt;P&gt;Hi guys,&lt;BR /&gt;
Please help me to write a dbquery in search bar.I have the following dbquery &lt;BR /&gt;
| dbquery "databasename" "select la,ba from abc" .&lt;BR /&gt;
I want to type this query in search bar as &lt;BR /&gt;
source=databasename sourcetype=tablename | fields la,ba&lt;/P&gt;

&lt;P&gt;I tried but it says invalid source or sourcetype. Please help me to write dbquery in search bar so that Splunk can read it in it's own syntax .....&lt;/P&gt;</description>
    <pubDate>Wed, 19 Feb 2014 15:01:00 GMT</pubDate>
    <dc:creator>vikas_gopal</dc:creator>
    <dc:date>2014-02-19T15:01:00Z</dc:date>
    <item>
      <title>how to write dbquery in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-write-dbquery-in-search/m-p/157219#M185797</link>
      <description>&lt;P&gt;Hi guys,&lt;BR /&gt;
Please help me to write a dbquery in search bar.I have the following dbquery &lt;BR /&gt;
| dbquery "databasename" "select la,ba from abc" .&lt;BR /&gt;
I want to type this query in search bar as &lt;BR /&gt;
source=databasename sourcetype=tablename | fields la,ba&lt;/P&gt;

&lt;P&gt;I tried but it says invalid source or sourcetype. Please help me to write dbquery in search bar so that Splunk can read it in it's own syntax .....&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2014 15:01:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-write-dbquery-in-search/m-p/157219#M185797</guid>
      <dc:creator>vikas_gopal</dc:creator>
      <dc:date>2014-02-19T15:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to write dbquery in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-write-dbquery-in-search/m-p/157220#M185798</link>
      <description>&lt;P&gt;That's not going to work, Splunk cannot translate SPL into SQL.&lt;/P&gt;

&lt;P&gt;What's wrong with using &lt;CODE&gt;| dbquery databasename "SQL query"&lt;/CODE&gt;?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2014 16:30:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-write-dbquery-in-search/m-p/157220#M185798</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-02-19T16:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to write dbquery in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-write-dbquery-in-search/m-p/157221#M185799</link>
      <description>&lt;P&gt;Thanks Martin..in the first line you cleared my doubt and nothing is wrong with |dbquery it works absolutely fine but I am trying to understand the concept how indexing will work with DBconnect.Please correct me if I am wrong , as per my understanding Splunk will act as frontend app if we connect to database using DBConnect app Splunk won't do indexing of the data.If it does then how  (I mean at what stage it indexes the data is it at the time of running the query or at the time of connecting database using DBconnect)&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2014 17:42:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-write-dbquery-in-search/m-p/157221#M185799</guid>
      <dc:creator>vikas_gopal</dc:creator>
      <dc:date>2014-02-19T17:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to write dbquery in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-write-dbquery-in-search/m-p/157222#M185800</link>
      <description>&lt;P&gt;FYI I build connection to oracle database with ODBC and in DBconeect I used "database connection in Splunk manager" option .&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2014 18:09:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-write-dbquery-in-search/m-p/157222#M185800</guid>
      <dc:creator>vikas_gopal</dc:creator>
      <dc:date>2014-02-19T18:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to write dbquery in search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-write-dbquery-in-search/m-p/157223#M185801</link>
      <description>&lt;P&gt;Running a piece of SQL through &lt;CODE&gt;dbquery&lt;/CODE&gt; and indexing events from a database are two unrelated concepts, &lt;CODE&gt;dbquery&lt;/CODE&gt; runs its SQL at search time, no indexing involved.&lt;/P&gt;

&lt;P&gt;You can configure DBConnect to run SQL queries on a schedule and index their results, see &lt;A href="http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/Configuredatabasemonitoring"&gt;http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/Configuredatabasemonitoring&lt;/A&gt; for more info.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2014 18:10:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-write-dbquery-in-search/m-p/157223#M185801</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-02-19T18:10:38Z</dc:date>
    </item>
  </channel>
</rss>

