Archive/Purge fails due to orphan entries for video events

Symptom

Archive/Purge fails due to orphan entries for video events that no longer exist on the recorder. Null entries in the database will cause an error similar to the following:

"71 out of 71 video recordings, associated with 'Events', have not be stored
- Select 'OK' to archive video recordings now (this may take awhile).
- Select 'Cancel' and change 'Records Older Than' criteria for 'Events and Alarm Acknowledgements' to a larger number."

Resolution

This error occurs because the location of the archived video was deleted, causing the database to contain null values in the archive location ID row. These entries must be removed with a query in order to finish the process of archiving and purging.

To remove the null entries:

1) SQL Server Management Studio


2) In Object Explorer pane, Expand out DataBase and  locate the AccessControl database.
 
3) Right-click the AccessControl database and select New Query 

4) Run the following query:

Select * from events_video where archivelocationid=0

5) If the query returns any rows, run the following query:

Delete from events_video where archivelocationid=0

6) Try the Archive/Purge process again in System Administration.

Applies To

OnGuard (All versions)

Additional Information

None