Follow

Rebuilding ESM Database Indexes

Background and Symptom

The ESM MS SQL databases may, under certain conditions and after a long period of heavy use, develop fragmented database indexes.  These fragmented indexes can slow a variety of operations, eventually causing errors that report the following message in the Windows Event Log: 

Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

Operations which may be affected by this error include: adding or removing cameras, adding or removing users, and missing recorded video from multiple cameras (which will also create a notification on the ESM Alarms page).

 

Corrective Action

  1. Open SQL Server Management Studio.
  2. Connect to the ESM management server (which hosts the ESM5_2_Central database).
  3. Execute the following SQL commands:

    USE ESM5_2_Central
    GO
     
    sp_msforeachtable "PRINT '?'; ALTER INDEX ALL ON ? REBUILD WITH (FILLFACTOR = 80)"

    The query should be executed successfully.
  4. Connect to each ESM archive server (each of which host a separate ESM5_2 database).
  5. For each archive server, execute the following SQL command:

    USE ESM5_2
    GO 
     
    sp_msforeachtable "PRINT '?'; ALTER INDEX ALL ON ? REBUILD WITH (FILLFACTOR = 80)"

    The query should be executed successfully.

 

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk