All Apps and Add-ons

Splunk DB Connect 2: Why does a timestamp column pulled from MSSQL sometimes show negative values in indexed data?

Ananton
Explorer

Hey,

I'm using the Splunk DB Connect App 2 to index data from an MS SQL Server.
The data was indexed as a Rising Column Input, with the Rising Column "AlarmLogItemID" and the Timestamp Column "AssertTime".
There was a second Timestamp named "RemitTime".
In the indexed Data, errors occur in the "RemitTime"-Column. Sometimes the epoch-timestamp has the value "-2208988800000".

Has someone an Idea, why this error occurs?!

0 Karma

Ananton
Explorer

Is it possible that the value (-2208988800000) is an Wildcard/Placeholder for an unwritten Timestamp?

0 Karma

einkebil
Explorer

It looks like an overflow of the data .

if it is the case :

The format in MSSQL of time is not like unix timestamps (see below).

You may try convert (bigint) and divide in the select query by 1000 the values to get seconds for the "Long" Part (left side of the comma|dot ) and the milliseconds will be dropped out.


Remark form https://technet.microsoft.com/en-us/library/aa260631(v=sql.80).aspx

The Transact-SQL timestamp data type is not the same as the timestamp data type defined in the SQL-92 standard. The SQL-92 timestamp data type is equivalent to the Transact-SQL datetime data type. A future release of Microsoft® SQL Server™ may modify the behavior of the Transact-SQL timestamp data type to align it with the behavior defined in the standard. At that time, the current timestamp data type will be replaced with a rowversion

0 Karma

rtunstal
New Member

Really struggling with this also. Converted the time by diving by 1000 and converting to a big int but db connect2 refused to index when I specify a timecolumn - changing this to index time works fine.

Query as follows now and Using the column Time

SELECT AllocationHistoryID, CONVERT(bigint,(DATEDIFF(s, '1970-01-01 00:00:00',StartTime ))) As Time, StartTime,EndTime, JobID, NodeName, UniqueCoreID FROM "HPCReporting"."dbo"."AllocationHistoryView"

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Unlocking Unified Insights: New Gigamon Federated Search App for Splunk

In today’s data-heavy environment, organizations are caught in a data distribution dilemma. As data volumes ...

GA: New Data Management App in Splunk Platform

Streamlining Data Management: Introducing a unified experience in Splunk Managing data at scale shouldn’t feel ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...