<?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 DB Connect 2: Slash (&amp;quot;/&amp;quot;) in SQL query always return 0 rows in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228467#M25399</link>
    <description>&lt;P&gt;Can you verify that the query is actually being sent to the target database? I am having an similar unresolved issue with using the CONVERT_TZ function. That issue is here: &lt;A href="https://answers.splunk.com/answers/386612/splunk-db-connect-2-blocking-mysql-function.html"&gt;https://answers.splunk.com/answers/386612/splunk-db-connect-2-blocking-mysql-function.html&lt;/A&gt; .  My query was not even getting the target database. In my case, it was seemingly Splunk DB Connect 2 that was automatically doing this before even sending the query to the DB.&lt;/P&gt;</description>
    <pubDate>Thu, 31 Mar 2016 20:51:04 GMT</pubDate>
    <dc:creator>jsilverbears</dc:creator>
    <dc:date>2016-03-31T20:51:04Z</dc:date>
    <item>
      <title>Splunk DB Connect 2: Slash ("/") in SQL query always return 0 rows</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228461#M25393</link>
      <description>&lt;P&gt;Splunk 6.2.6, DB Connect 2.1.1&lt;/P&gt;

&lt;P&gt;When I run a SQL query with a &lt;CODE&gt;/&lt;/CODE&gt; inside, Splunk will always return 0 rows. For example, when running against an Oracle DB:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM V$ACTIVE_SESSION_HISTORY
WHERE sample_time &amp;gt;= (SYSDATE-__0.0833__) AND sample_time &amp;lt; (SYSDATE+1)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Returns 700+ rows&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM V$ACTIVE_SESSION_HISTORY
WHERE sample_time &amp;gt;= (SYSDATE-__2/24__) AND sample_time &amp;lt; (SYSDATE+1)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Returns 0 rows&lt;/P&gt;

&lt;P&gt;Is there a way to escape the &lt;CODE&gt;/&lt;/CODE&gt; character in the query?&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2016 23:04:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228461#M25393</guid>
      <dc:creator>jnraptor</dc:creator>
      <dc:date>2016-01-18T23:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk DB Connect 2: Slash ("/") in SQL query always return 0 rows</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228462#M25394</link>
      <description>&lt;P&gt;I don't have an Oracle DB handy, but usually escaping is done with a backslash.&lt;/P&gt;

&lt;P&gt;I don't know if this will help or hinder your problem, and for all I know it'll make Oracle choke and your C-level executives cry from the downtime, but you could try &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM V$ACTIVE_SESSION_HISTORY
WHERE sample_time &amp;gt;= (SYSDATE-2\/24) AND sample_time &amp;lt; (SYSDATE+1)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When in doubt, you can add two or even three backslashes.  Sometimes you have to escape the escape character, and at other times you have to escape them with a double-backslash, making it an escape for the escape to escape.  I think.  &lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 03:10:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228462#M25394</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2016-01-19T03:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk DB Connect 2: Slash ("/") in SQL query always return 0 rows</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228463#M25395</link>
      <description>&lt;P&gt;BTW, that's a forward slash.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Forward slash /
Back slash \
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Jan 2016 03:12:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228463#M25395</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2016-01-19T03:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk DB Connect 2: Slash ("/") in SQL query always return 0 rows</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228464#M25396</link>
      <description>&lt;P&gt;Updated title&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 04:07:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228464#M25396</guid>
      <dc:creator>jnraptor</dc:creator>
      <dc:date>2016-01-19T04:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk DB Connect 2: Slash ("/") in SQL query always return 0 rows</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228465#M25397</link>
      <description>&lt;P&gt;I tried doing the following escape sequences, but none of them worked:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"\/", "//", "///"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Jan 2016 04:10:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228465#M25397</guid>
      <dc:creator>jnraptor</dc:creator>
      <dc:date>2016-01-19T04:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk DB Connect 2: Slash ("/") in SQL query always return 0 rows</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228466#M25398</link>
      <description>&lt;P&gt;Try this option in the where clause&lt;BR /&gt;
where sample_time  between sysdate - interval '2' hour and .....&lt;BR /&gt;
,Try this&lt;BR /&gt;
where sample_time between sysdate - interval '2' hour and sysdate&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:50:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228466#M25398</guid>
      <dc:creator>rajesh_rama</dc:creator>
      <dc:date>2020-09-29T08:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk DB Connect 2: Slash ("/") in SQL query always return 0 rows</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228467#M25399</link>
      <description>&lt;P&gt;Can you verify that the query is actually being sent to the target database? I am having an similar unresolved issue with using the CONVERT_TZ function. That issue is here: &lt;A href="https://answers.splunk.com/answers/386612/splunk-db-connect-2-blocking-mysql-function.html"&gt;https://answers.splunk.com/answers/386612/splunk-db-connect-2-blocking-mysql-function.html&lt;/A&gt; .  My query was not even getting the target database. In my case, it was seemingly Splunk DB Connect 2 that was automatically doing this before even sending the query to the DB.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 20:51:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228467#M25399</guid>
      <dc:creator>jsilverbears</dc:creator>
      <dc:date>2016-03-31T20:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk DB Connect 2: Slash ("/") in SQL query always return 0 rows</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228468#M25400</link>
      <description>&lt;P&gt;To resolve the issue, you should edit&lt;BR /&gt;
 &lt;EM&gt;$SPLUNK_HOME/etc/apps/splunk_app_db_connect/bin/dbxquery.py&lt;/EM&gt;:&lt;BR /&gt;
change the line (usually its number is 123)&lt;BR /&gt;
&lt;EM&gt;query = urllib.quote(query)&lt;/EM&gt;&lt;BR /&gt;
to&lt;BR /&gt;
&lt;EM&gt;query = urllib.quote(query, safe='')&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Don't forget to make a backup copy before editing. Take care to keep changes after upgrades.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:26:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228468#M25400</guid>
      <dc:creator>Dmitri_P</dc:creator>
      <dc:date>2020-09-29T09:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk DB Connect 2: Slash ("/") in SQL query always return 0 rows</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228469#M25401</link>
      <description>&lt;P&gt;Running in enterprise environment - I have no access to the filesystem where Splunk is installed.&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2016 21:38:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228469#M25401</guid>
      <dc:creator>jnraptor</dc:creator>
      <dc:date>2016-05-05T21:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk DB Connect 2: Slash ("/") in SQL query always return 0 rows</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228470#M25402</link>
      <description>&lt;P&gt;If you have no access to the fily system, try to ask the DB admins to create a view/stored function on the server side and do select * from the view/stored function.&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2016 07:26:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228470#M25402</guid>
      <dc:creator>Dmitri_P</dc:creator>
      <dc:date>2016-05-06T07:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk DB Connect 2: Slash ("/") in SQL query always return 0 rows</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228471#M25403</link>
      <description>&lt;P&gt;This is a known issue in DB Connect version 2.1.1 and is fixed in version 2.2.0 &lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/DBX/2.2.0/ReleaseNotes/Releasenotes#Fixed_issues"&gt;http://docs.splunk.com/Documentation/DBX/2.2.0/ReleaseNotes/Releasenotes#Fixed_issues&lt;/A&gt;&lt;BR /&gt;
DBX-2646    Slashes (/) in SQL silently break the query.&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2016 01:06:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-DB-Connect-2-Slash-quot-quot-in-SQL-query-always-return-0/m-p/228471#M25403</guid>
      <dc:creator>mjohnson_splunk</dc:creator>
      <dc:date>2016-05-12T01:06:19Z</dc:date>
    </item>
  </channel>
</rss>

