No events in the Report Server SQL database and events not updating

NOTICE

POTENTIAL FOR DATA LOSS.
The steps detailed in the resolution of this article may result in a loss of critical data if not performed properly. Before beginning these steps, make sure all important data is backed up in the event of data loss. If you are unsure, please contact Product Support Services prior to attempting the procedure below.

NOTICE

COMPLEX PROCEDURE REQUIRED.
The resolution of this article has many complex steps that may result in unforeseen results if not performed correctly. If you are at all unfamiliar with the requirements, please contact Product Support Services for assistance.

Issue

No events are transferred to the Report Server SQL database. Trend logs are transferred just fine.

In the report agent log you can see this message "Sequence contains no elements"

Product Line

SmartStruxure Solution

Environment

Report Server

Cause

The Enterprise Server has been renamed before the Report Server has been installed or before the Report Server Agent has started collecting data

Resolution

This issue will be fixed in a future version, but until that, do the following to correct the issue:

The fix is split in two sections. First a section working with the "event.db" file from the SBO database, and second a section working with the "StruxureWareReportsDB" from SQL Management Studio.


"event.db" from the SBO database

1. Download http://www.sqliteexpert.com/download.html (Just take the personal one)

2. Stop the Enterprise Server

3. Copy the "event.db" file to a safe location

4. Attach the "event.db" file to "SQLite Expert Studio"

5. Get the first event from the event.db using the following query in the "SQL" tab:

SELECT SEQNO,TimeStamp,EventGUID,SourceServer
FROM t_7E_2FSystem_2FEvents_2FEventLog_2FEventRecords
ORDER BY SeqNo
LIMIT 1;

6. Convert the TimeStamp with this "SBO TimeStamp Converter" tool

 


"StruxureWareReportsDB" using SQL Management Studio

1. Write the following SQL query in SQL Management Studio, using the converted time stamp, and the Guid you found previously.

INSERT INTO tbEvents (DateTimeStamp,SeqNo,OriginalSeqNo,Guid) VALUES ('2014-04-17 08:35:23.857','1','1', '380d1c4c-c60b-11e3-8ecb-b8ac6f81243c')

2. Start the Enterprise Server again

3. Restart the Report Agent and let it run for a while.