<?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: How do I connect to a local SQLite database? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-connect-to-a-local-SQLite-database/m-p/239891#M188779</link>
    <description>&lt;P&gt;I've just replaced the file in the /default/ directory. My database type is now showing up in the list..&lt;/P&gt;</description>
    <pubDate>Mon, 27 Mar 2017 14:27:45 GMT</pubDate>
    <dc:creator>mblauw</dc:creator>
    <dc:date>2017-03-27T14:27:45Z</dc:date>
    <item>
      <title>How do I connect to a local SQLite database?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-connect-to-a-local-SQLite-database/m-p/239885#M188773</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;This has been asked before, but I have yet to find an answer on Splunk Answers that details the actual steps to connect to a local SQLite database (e.g. embedded within a custom app).  The responses i've seen either (1) point directly to the Splunk Documentation (Install drivers for other databases) which I find has minimal specifics on actually getting it working; (2) show that it works but without detailing the connection specifics (e.g., how to set up DB Connect connection and/or edit db_connection_types.conf?); or (3) say that it should 'just work' (but how do i set up a DB Connect connection if there isn't a SQLite connection type defined, since you have to pick an existing connection?).&lt;/P&gt;

&lt;P&gt;From what I can tell, I need to define a SQLite type in the db_connection_types.conf file in order for it to work no matter what.  If so, what is the serviceClass -- do I also need to write a Java class for each custom connection type?   Here's what I currently have:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sqlite]
displayName = SQLite
serviceClass = ???
jdbcUrlFormat = jdbc:sqlite:&amp;lt;database&amp;gt;
jdbcDriverClass = org.sqlite.JDBC
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any specifics on how to get this set up - either defining a connection in DB Connect or setting up the db_connection_types.conf - would be much appreciated.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:41:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-connect-to-a-local-SQLite-database/m-p/239885#M188773</guid>
      <dc:creator>wcooper003</dc:creator>
      <dc:date>2020-09-29T10:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do I connect to a local SQLite database?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-connect-to-a-local-SQLite-database/m-p/239886#M188774</link>
      <description>&lt;P&gt;Referencing an &lt;A href="https://answers.splunk.com/answering/290018/view.html"&gt;answer on a similar question&lt;/A&gt; would &lt;CODE&gt;com.splunk.dbx2.DefaultDBX2JDBC&lt;/CODE&gt; work as a generic serviceClass?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2016 21:08:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-connect-to-a-local-SQLite-database/m-p/239886#M188774</guid>
      <dc:creator>acharlieh</dc:creator>
      <dc:date>2016-08-19T21:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I connect to a local SQLite database?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-connect-to-a-local-SQLite-database/m-p/239887#M188775</link>
      <description>&lt;P&gt;this works. here's my db_connection_types.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sqlite]
displayName = SQLite
serviceClass = com.splunk.dbx2.DefaultDBX2JDBC
jdbcDriverClass = org.sqlite.JDBC
jdbcUrlFormat = jdbc:sqlite:&amp;lt;database&amp;gt;
ui_default_catalog = $database$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and here's my db_connections.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[kegbot]
connection_type = sqlite
database = /Users/jcoates/Downloads/kegbot.sqlite
host = localhost
identity = jigglypuff
jdbcUrlFormat = jdbc:sqlite:&amp;lt;database&amp;gt;
jdbcUseSSL = 0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:42:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-connect-to-a-local-SQLite-database/m-p/239887#M188775</guid>
      <dc:creator>jcoates_splunk</dc:creator>
      <dc:date>2020-09-29T10:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do I connect to a local SQLite database?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-connect-to-a-local-SQLite-database/m-p/239888#M188776</link>
      <description>&lt;P&gt;Thanks for the response. &lt;/P&gt;

&lt;P&gt;I copied your properties into apps/splunk_app_db_connect/local/db_connection_types.conf -- here is the file contents:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[local]

[sqlite]
displayName = SQLite
serviceClass = com.splunk.dbx2.DefaultDBX2JDBC
jdbcDriverClass = org.sqlite.JDBC
jdbcUrlFormat = jdbc:sqlite:&amp;lt;database&amp;gt;
ui_default_catalog = $database$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I then restarted Splunk.  &lt;/P&gt;

&lt;P&gt;However - when I go to the DB Connect v2 app and click to add a new Connection, I still don't see an option for SQLite in the Database Types - Select Database Type dropdown menu.  Am I  missing something?  &lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:40:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-connect-to-a-local-SQLite-database/m-p/239888#M188776</guid>
      <dc:creator>wcooper003</dc:creator>
      <dc:date>2020-09-29T10:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I connect to a local SQLite database?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-connect-to-a-local-SQLite-database/m-p/239889#M188777</link>
      <description>&lt;P&gt;I currently have got this same issue.. Were you already able to resolve this?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2017 14:05:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-connect-to-a-local-SQLite-database/m-p/239889#M188777</guid>
      <dc:creator>mblauw</dc:creator>
      <dc:date>2017-03-27T14:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I connect to a local SQLite database?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-connect-to-a-local-SQLite-database/m-p/239890#M188778</link>
      <description>&lt;P&gt;I never got it working, I ended up using a KV store within our app instead to keep persistent data that we need.  &lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2017 14:09:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-connect-to-a-local-SQLite-database/m-p/239890#M188778</guid>
      <dc:creator>wcooper003</dc:creator>
      <dc:date>2017-03-27T14:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do I connect to a local SQLite database?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-connect-to-a-local-SQLite-database/m-p/239891#M188779</link>
      <description>&lt;P&gt;I've just replaced the file in the /default/ directory. My database type is now showing up in the list..&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2017 14:27:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-connect-to-a-local-SQLite-database/m-p/239891#M188779</guid>
      <dc:creator>mblauw</dc:creator>
      <dc:date>2017-03-27T14:27:45Z</dc:date>
    </item>
  </channel>
</rss>

