Technical FAQs

Ask a Question

Global Event Viewer is unresponsive or generates error when attempting to access

Global Event Viewer is either unresponsive and does not update or attempts to access the Global Event Viewer generate errors:
"The Datediff function resulted in an overflow...."

Product Line
Struxureware Power Monitoring
Power Monitoring Expert

SQL Server, Vista

This is generally caused by an event, data, or waveform timestamp being in the future. In some cases, historical data may get tagged with future timestamps for various reasons.
This creates too large of a gap in the sequence of events for the Global Event Viewer to span.

*Warning: Irreparable database damage can occur. This procedure should only be performed by users familiar with SQL Server Management Studio. Databases should be backed up prior to performing this procedure.*

To correct this issue on a reactive basis, the database will need to be modified.

1.) Run the following scripts to determine the exact source(s) of the issue.
Note: Modify the date to be "tomorrow's" date from whenever you use this article.

 Select * From DataLog2
 Where TimeStampUTC > '2014-06-18'
 order by TimeStampUTC

 Select * From EventLog2
 Where TimeStampUTC > '2014-06-18'
 order by TimeStampUTC

 Select * From WaveformLog2
 Where TimeStampUTC > '2014-06-18'
 order by TimeStampUTC

2.) Delete the entire entry for the future dates.
Note: Make sure the dates are changed appropriately or this could result in loss of data.

 where TimeStampUTC > '2014-06-18'

 where TimeStampUTC > '2014-06-18'

 DELETE FROM WaveformLog2
 where TimeStampUTC > '2014-06-18'

2_b.)Attempting to delete from EventLog2 within SQL may result in the following error:

 The DELETE statement conflicted with the REFERENCE constraint "FK_EventAcknowledgement_EventLog". The conflict occurred in database  "ION_Data", table "dbo.EventAcknowledgement", column 'EventLogID'.
 The statement has been terminated.
 To correct this run the following Script and then run the EventLog2 script from step 2 above.
 Note: Once again, remember to change the dates
 delete FROM EventAcknowledgement where EventLogid in (Select id from EventLog2
 where TimeStampUTC > '2014-06-18')

Now the Global Event Viewer can be opened in Vista without issue.
More research into the conflicting meters will need to be complete to fully correct the issue.

Was this helpful?
What can we do to improve the information ?