<?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 : SQL query column output ALIAS names are not indexing as fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110410#M183575</link>
    <description>&lt;P&gt;This would have to do with the sourcetype = helpspot_errors , that tells splunk of how you want it indexed. Is the sourcetype format dbmon:mkv ? If not you could just set the sourcetype=dbmon:mkv&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jan 2014 15:57:13 GMT</pubDate>
    <dc:creator>aelliott</dc:creator>
    <dc:date>2014-01-13T15:57:13Z</dc:date>
    <item>
      <title>DB Connect : SQL query column output ALIAS names are not indexing as fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110407#M183572</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Background:&lt;/P&gt;

&lt;P&gt;I am trying to index SQL source where i have to give alias to table column names.&lt;/P&gt;

&lt;P&gt;My query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;WITH T1 AS( SELECT xErrors AS [Error_ID],MAX(DATEADD(s, dtErrorDate, '1970-01-01 00:00:00')) AS [Timestamp],sType AS [Type],sFile AS [File],sLine AS [Line],sDesc AS [Description] from HS_Errors group by xErrors, sType, sFile, sLine, sDesc)SELECT * FROM T1 order by [Error_ID]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Where xErrors is an identity column, so i put it as rising column.&lt;/P&gt;

&lt;P&gt;I tried putting it in inputs.conf file as below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[dbmon-tail://sa-sdsql05_HelpSpot/helpspot_errors]
index = default
interval = auto
output.format = mkv
output.timestamp = 1
output.timestamp.column = TimeStamp
output.timestamp.format = yyyy-MM-dd HH:mm:ss.SSSXXX
output.timestamp.parse.format = yyyy-MM-dd HH:mm:ss.SSSXXX
query = WITH T1 AS( SELECT xErrors AS [Error_ID],MAX(DATEADD(s, dtErrorDate, '1970-01-01 00:00:00')) AS [Timestamp],sType AS [Type],sFile AS [File],sLine AS [Line],sDesc AS [Description] from HS_Errors group by xErrors, sType, sFile, sLine, sDesc ) SELECT * FROM T1 {{WHERE $rising_column$ &amp;gt; ?}} order by $rising_column$
sourcetype = helpspot_errors
tail.rising.column = Error_ID
disabled = 0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If i run query in SQl management studio it gives me an output as following columns :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Error_ID   Timestamp     Type    File    Line    Description
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which is fine, but the problem is when data gets indexed in SPLUNK, it doesn't make column headers as fields but it shows me in raw data as below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;6:29:06.716 AM  
2014-01-13 06:29:06.716Z Error_ID=1171961 Timestamp=1389393351.000 Type=Database File="C:\\Program Files (x86)\\helpspot\\helpspot\\helpspot\\lib\\class.person.status.php" Line=32 Description="SQLState: 22018
Error Code: 245
Message: [Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting the varchar value 'HS-82493' to data type int."
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to have Error_ID,Timestamp,Type,File,Line,Description as automatically created interesting fields.  Please help me.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2014 07:17:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110407#M183572</guid>
      <dc:creator>ma7859</dc:creator>
      <dc:date>2014-01-13T07:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: DB Connect : SQL query column output ALIAS names are not indexing as fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110408#M183573</link>
      <description>&lt;P&gt;Is there anything but integers in the Error_ID field? &lt;BR /&gt;
if you run select error_ID from hs_errors where Error_ID = 'HS-82493' does it come back with results?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:38:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110408#M183573</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2020-09-28T15:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: DB Connect : SQL query column output ALIAS names are not indexing as fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110409#M183574</link>
      <description>&lt;P&gt;Error_ID is the alias i have given to xErrors column which is an identity column with datatype as integer.&lt;BR /&gt;
I tried executing below query as u suggested but got exception msg :&lt;/P&gt;

&lt;P&gt;SELECT xErrors from hs_errors where xErrors = 'HS-82493'&lt;/P&gt;

&lt;P&gt;Exception msg:&lt;/P&gt;

&lt;P&gt;Conversion failed when converting the varchar value 'HS-82493' to data type int.&lt;/P&gt;

&lt;P&gt;My problem is those aliases are coming as column name in SQL management studio, i want them as splunk fields in splunk, which is not coming in splunk.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2014 15:51:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110409#M183574</guid>
      <dc:creator>ma7859</dc:creator>
      <dc:date>2014-01-13T15:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: DB Connect : SQL query column output ALIAS names are not indexing as fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110410#M183575</link>
      <description>&lt;P&gt;This would have to do with the sourcetype = helpspot_errors , that tells splunk of how you want it indexed. Is the sourcetype format dbmon:mkv ? If not you could just set the sourcetype=dbmon:mkv&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2014 15:57:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110410#M183575</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2014-01-13T15:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: DB Connect : SQL query column output ALIAS names are not indexing as fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110411#M183576</link>
      <description>&lt;P&gt;Yes its MKV,&lt;/P&gt;

&lt;P&gt;output.format = mkv&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2014 16:12:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110411#M183576</guid>
      <dc:creator>ma7859</dc:creator>
      <dc:date>2014-01-13T16:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: DB Connect : SQL query column output ALIAS names are not indexing as fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110412#M183577</link>
      <description>&lt;P&gt;have you checked the splunkd.log for any errors?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2014 16:24:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110412#M183577</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2014-01-13T16:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: DB Connect : SQL query column output ALIAS names are not indexing as fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110413#M183578</link>
      <description>&lt;P&gt;output format is mkv.&lt;BR /&gt;
[dbmon-tail://sa-sdsql05_HelpSpot/helpspot_errors]&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:38:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110413#M183578</guid>
      <dc:creator>ma7859</dc:creator>
      <dc:date>2020-09-28T15:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: DB Connect : SQL query column output ALIAS names are not indexing as fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110414#M183579</link>
      <description>&lt;P&gt;ya i checked splunkd.log, but didnt find any errors.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2014 07:48:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110414#M183579</guid>
      <dc:creator>ma7859</dc:creator>
      <dc:date>2014-01-14T07:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: DB Connect : SQL query column output ALIAS names are not indexing as fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110415#M183580</link>
      <description>&lt;P&gt;Can you please open a support case?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2014 19:07:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110415#M183580</guid>
      <dc:creator>araitz</dc:creator>
      <dc:date>2014-01-14T19:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: DB Connect : SQL query column output ALIAS names are not indexing as fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110416#M183581</link>
      <description>&lt;P&gt;My bad, the problem was some of my legacy applications which were configured with the same source-type name whose props.conf and transform.conf were overwriting this new source-type with the same name.&lt;BR /&gt;
I changed the source-type name and it solved this weird problem.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2014 06:26:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110416#M183581</guid>
      <dc:creator>ma7859</dc:creator>
      <dc:date>2014-01-16T06:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: DB Connect : SQL query column output ALIAS names are not indexing as fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110417#M183582</link>
      <description>&lt;P&gt;Could you be more specific in how you solved this issue?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jul 2014 00:10:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DB-Connect-SQL-query-column-output-ALIAS-names-are-not-indexing/m-p/110417#M183582</guid>
      <dc:creator>AvianFLU</dc:creator>
      <dc:date>2014-07-24T00:10:48Z</dc:date>
    </item>
  </channel>
</rss>

