Submit a ticketCall us
Home > Success Center > Orion Platform > Troubleshooting database CHECK constraints

Troubleshooting database CHECK constraints

Updated January 25, 2018

Overview

Historical tables in the database are used for partitioned views. CHECK constraints on these tables are important, as incorrect constraints can cause errors in modules like database maintenance.

Make sure that every historical table has CHECK constraints (name starts with CHK_) enabled. 
Sometimes the CHECK constraints can fail because of a wrong date format in the WHERE clause. 

For example, if the Windows locale is changed from English to Swedish, new CHECK constraints will have Swedish month names and old months will be English. In this case, constraints would not work.

 

Environment

  • SolarWinds Orion Platform version 12.1 and later.

 

Cause 

Incorrect CHECK constraints can cause errors in modules like database maintenance.

 

Resolution

If a CHECK constraint is missing or is invalid, recreate the constraint manually or run the script from here

Warning: The script drops and creates CHECK constraints and assumes that daily data is one week.

Sometimes data in historical tables can overlap. To fix this, remove overlapping data manually or recreate these tables.

 

Last modified

Tags

Classifications

Public