<?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: Why do I get the following error &amp;quot;There was an error processing your request. It has been logged&amp;quot; in a Data Lab Input for Splunk DB Connect? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-do-I-get-the-following-error-quot-There-was-an-error/m-p/455172#M56014</link>
    <description>&lt;P&gt;A defined temp table will not work when doing a CREATE TABLE, however, I took a query and instead of the CREATE TABLE, I did SELECT INTO table_name and it worked just fine in Splunk. Really odd. I did not think about using the UNION, I will look in to that. I appreciate your comment!&lt;/P&gt;</description>
    <pubDate>Tue, 24 Jul 2018 22:15:23 GMT</pubDate>
    <dc:creator>sochsenbein</dc:creator>
    <dc:date>2018-07-24T22:15:23Z</dc:date>
    <item>
      <title>Why do I get the following error "There was an error processing your request. It has been logged" in a Data Lab Input for Splunk DB Connect?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-do-I-get-the-following-error-quot-There-was-an-error/m-p/455170#M56012</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am getting the error "there was an error processing your request. It has been logged" when I try to save the following query in a Data Lab Input for DB Connect:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

SELECT
    CONVERT(CHAR(10),LL.run_datetime,101)+' '+CONVERT(CHAR(8),LL.run_datetime,108) AS Date,
    CAST(CONVERT(CHAR(10),LL.run_datetime,101)+' '+CONVERT(CHAR(8),LL.run_datetime,114) AS VARCHAR(20)) AS Measured_Date,
    LL.prod_id
INTO #TempData
FROM    eng..lost_loads LL INNER JOIN met..range_radius RR ON RR.prod_id = LL.prod_id
WHERE LL.run_datetime BETWEEN DATEADD(mi, -15, GETDATE()) AND GETDATE()
order by LL.run_datetime    

SELECT 
  Date, 
  CONVERT(smalldatetime, Measured_Date) AS Measured_Date
  ,COUNT(1) AS  TempData
FROM #TempData
GROUP BY 
  Date, CONVERT(smalldatetime, Measured_Date)
ORDER BY Measured_Date DESC

DROP TABLE #TempData
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I entered the query manually in the db_inputs.conf as per this thread: &lt;A href="https://answers.splunk.com/answers/607692/splunk-dbconnect-311-build-34-there-was-an-error-p.html"&gt;https://answers.splunk.com/answers/607692/splunk-dbconnect-311-build-34-there-was-an-error-p.html&lt;/A&gt;&lt;BR /&gt;
However, I am still not seeing it when I refresh the Data Inputs page, I am assuming the server may need rebooted, but this is not an option at this time. Any suggestions?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 18:32:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-do-I-get-the-following-error-quot-There-was-an-error/m-p/455170#M56012</guid>
      <dc:creator>sochsenbein</dc:creator>
      <dc:date>2018-07-24T18:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Why do I get the following error "There was an error processing your request. It has been logged" in a Data Lab Input for Splunk DB Connect?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-do-I-get-the-following-error-quot-There-was-an-error/m-p/455171#M56013</link>
      <description>&lt;P&gt;As far as I know, DB connect doesn't support SP (Stored Procedure) style queries. Once upon a time, I remember using &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;UNION
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;SQL command to have my query work.&lt;BR /&gt;
if you must drop table after transaction, perhaps a second scheduled search that runs after 1st one can do it with:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|dbxquery "DROP TABLE &amp;lt;TABLE_NAME&amp;gt;" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Jul 2018 21:17:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-do-I-get-the-following-error-quot-There-was-an-error/m-p/455171#M56013</guid>
      <dc:creator>akocak</dc:creator>
      <dc:date>2018-07-24T21:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: Why do I get the following error "There was an error processing your request. It has been logged" in a Data Lab Input for Splunk DB Connect?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-do-I-get-the-following-error-quot-There-was-an-error/m-p/455172#M56014</link>
      <description>&lt;P&gt;A defined temp table will not work when doing a CREATE TABLE, however, I took a query and instead of the CREATE TABLE, I did SELECT INTO table_name and it worked just fine in Splunk. Really odd. I did not think about using the UNION, I will look in to that. I appreciate your comment!&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 22:15:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-do-I-get-the-following-error-quot-There-was-an-error/m-p/455172#M56014</guid>
      <dc:creator>sochsenbein</dc:creator>
      <dc:date>2018-07-24T22:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why do I get the following error "There was an error processing your request. It has been logged" in a Data Lab Input for Splunk DB Connect?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-do-I-get-the-following-error-quot-There-was-an-error/m-p/455173#M56015</link>
      <description>&lt;P&gt;So instead of a UNION (since this was placing data into a temp table and then working off that data), I just rewrote the second SELECT statement. It's ugly, but this works perfect:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

SELECT
    CONVERT(CHAR(10),LL.run_datetime,101)+' '+CONVERT(CHAR(8),LL.run_datetime,108) AS Date
    ,CONVERT(smalldatetime, CAST(CONVERT(CHAR(10),LL.run_datetime,101)+' '+CONVERT(CHAR(8),LL.run_datetime,114) AS VARCHAR(20))) AS Measured_Date
    ,COUNT(LL.prod_id) AS TempData
FROM    eng..lost_loads LL inner join met..range_radius RR ON RR.prod_id = LL.prod_id
WHERE LL.run_datetime between dateadd(mi, -15, getdate()) and getdate()
GROUP BY 
    CONVERT(CHAR(10),LL.run_datetime,101)+' '+CONVERT(CHAR(8),LL.run_datetime,108)
    ,CAST(CONVERT(CHAR(10),LL.run_datetime,101)+' '+CONVERT(CHAR(8),LL.run_datetime,114) AS VARCHAR(20))
ORDER BY CAST(CONVERT(CHAR(10),LL.run_datetime,101)+' '+CONVERT(CHAR(8),LL.run_datetime,114) AS VARCHAR(20))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Like I said, it's ugly. But it works lol.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jul 2018 23:13:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-do-I-get-the-following-error-quot-There-was-an-error/m-p/455173#M56015</guid>
      <dc:creator>sochsenbein</dc:creator>
      <dc:date>2018-07-24T23:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why do I get the following error "There was an error processing your request. It has been logged" in a Data Lab Input for Splunk DB Connect?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-do-I-get-the-following-error-quot-There-was-an-error/m-p/455174#M56016</link>
      <description>&lt;P&gt;If you can merge your queries into one SELECT, I think it is definitely better than UNION. &lt;BR /&gt;
UNION is a shortcut to me if I have the query from some DB admin and not have a time to make it better &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2018 17:07:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Why-do-I-get-the-following-error-quot-There-was-an-error/m-p/455174#M56016</guid>
      <dc:creator>akocak</dc:creator>
      <dc:date>2018-07-25T17:07:07Z</dc:date>
    </item>
  </channel>
</rss>

