<?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: DB Connect Input - Query works but Input does not in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/DB-Connect-Input-Query-works-but-Input-does-not/m-p/174322#M98258</link>
    <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I had this problem trying to search a MDB file . &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;java.sql.SQLException: Invalid Fetch Size
     at sun.jdbc.odbc.JdbcOdbcStatement.setFetchSize(Unknown Source)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Try to set in your dbquery search to use something like &lt;CODE&gt;limit=1000&lt;/CODE&gt; .  That solved my problems when using MDB files. &lt;/P&gt;</description>
    <pubDate>Fri, 10 Oct 2014 19:48:22 GMT</pubDate>
    <dc:creator>ViniciusANT</dc:creator>
    <dc:date>2014-10-10T19:48:22Z</dc:date>
    <item>
      <title>DB Connect Input - Query works but Input does not</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DB-Connect-Input-Query-works-but-Input-does-not/m-p/174321#M98257</link>
      <description>&lt;P&gt;Oh hai Splunkers!&lt;/P&gt;

&lt;P&gt;So I'm trying to extract a DB table for indexing into Splunk. I have successfully set up an ODBC connection to the external DB, and issuing SQL commands against it work without an issue (see below).&lt;/P&gt;

&lt;P&gt;&lt;IMG src="http://answers.splunk.com//storage/db_sql_success.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;Where it all appears to fall down is when I am setting up the DB Connect database input.&lt;/P&gt;

&lt;P&gt;Looking at the dbx_debug log, I see the following errors:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2014-03-05 17:14:00.036 dbx6402:WARN:Database - Database type=com.splunk.dbx.sql.type.impl.ODBC@29306c does not support connection validation
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Followed by:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2014-03-05 16:46:00.026 dbx1035:ERROR:TailDatabaseMonitor - Error while executing database monitor: java.sql.SQLException: Invalid Fetch Size
java.sql.SQLException: Invalid Fetch Size
    at sun.jdbc.odbc.JdbcOdbcStatement.setFetchSize(Unknown Source)
    at com.splunk.dbx.sql.type.impl.AbstractDatabaseType.setStreamingResults(AbstractDatabaseType.java:355)
    at com.splunk.dbx.sql.Database.configureStatement(Database.java:222)
    at com.splunk.dbx.sql.Database.query(Database.java:256)
    at com.splunk.dbx.monitor.impl.TailDatabaseMonitor.performMonitoring(TailDatabaseMonitor.java:115)
    at com.splunk.dbx.monitor.DatabaseMonitorExecutor.executeMonitor(DatabaseMonitorExecutor.java:126)
    at com.splunk.dbx.monitor.DatabaseMonitorExecutor.call(DatabaseMonitorExecutor.java:102)
    at com.splunk.dbx.monitor.DatabaseMonitorExecutor.call(DatabaseMonitorExecutor.java:37)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The SQL command that was used for the input returned only 36 events, so excessive results wouldn't appear to be the issue.&lt;/P&gt;

&lt;P&gt;Is connection validation a necessity for inputs? Is there something obvious I'm missing here?&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Environment&lt;/STRONG&gt;&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Windows Server 2012&lt;/LI&gt;
&lt;LI&gt;Splunk 5.0.5&lt;/LI&gt;
&lt;LI&gt;JRE7 (1.7.0_51 32-bit)&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 05 Mar 2014 06:17:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DB-Connect-Input-Query-works-but-Input-does-not/m-p/174321#M98257</guid>
      <dc:creator>rturk</dc:creator>
      <dc:date>2014-03-05T06:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: DB Connect Input - Query works but Input does not</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DB-Connect-Input-Query-works-but-Input-does-not/m-p/174322#M98258</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I had this problem trying to search a MDB file . &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;java.sql.SQLException: Invalid Fetch Size
     at sun.jdbc.odbc.JdbcOdbcStatement.setFetchSize(Unknown Source)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Try to set in your dbquery search to use something like &lt;CODE&gt;limit=1000&lt;/CODE&gt; .  That solved my problems when using MDB files. &lt;/P&gt;</description>
      <pubDate>Fri, 10 Oct 2014 19:48:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DB-Connect-Input-Query-works-but-Input-does-not/m-p/174322#M98258</guid>
      <dc:creator>ViniciusANT</dc:creator>
      <dc:date>2014-10-10T19:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: DB Connect Input - Query works but Input does not</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DB-Connect-Input-Query-works-but-Input-does-not/m-p/174323#M98259</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I came around same issues when i am trying to specify database input. I've tried with adding | limit = 1000 at the end of query, but it doesnt work. Do you maybe have configuraton stanza for your input that is working?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Dec 2014 14:20:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DB-Connect-Input-Query-works-but-Input-does-not/m-p/174323#M98259</guid>
      <dc:creator>MaverickT</dc:creator>
      <dc:date>2014-12-24T14:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: DB Connect Input - Query works but Input does not</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DB-Connect-Input-Query-works-but-Input-does-not/m-p/174324#M98260</link>
      <description>&lt;P&gt;I solved this issue by running scheduled search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=test | head 1  | map search="| dbquery \"test\" \"SELECT Format(orderDate, 'yyyy-mm-dd hh:nn:ss') as orderDateDisplay, memberID, orderID, orderStatus FROM [order] WHERE orderID &amp;gt; $orderID$ \"  limit=10000" | collect index=test sourcetype=orders addtime=false
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Dec 2014 09:18:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DB-Connect-Input-Query-works-but-Input-does-not/m-p/174324#M98260</guid>
      <dc:creator>MaverickT</dc:creator>
      <dc:date>2014-12-31T09:18:18Z</dc:date>
    </item>
  </channel>
</rss>

