Submit a ticketCall us

Training ClassSign up for Network Performance Monitor (NPM) and Scalability instructor-led classes

Attend our instructor-led classes, provided by SolarWinds® Academy, to discuss the more advanced monitoring mechanisms available in NPM as well as how to tune your equipment to optimize its polling capabilities. NPM classes offered:
NPM Custom Monitoring and Polling
Orion Platform Scalability

Reserve your seat.

Home > Success Center > Orion Platform > Orion - Knowledgebase Articles > Troubleshooting database CHECK constraints

Troubleshooting database CHECK constraints

Updated January 25, 2018


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.



  • SolarWinds Orion Platform version 12.1 and later.



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



Before running the script, back up your SolarWinds Orion database. If you need help, check your vendor's site for instructions.

If your Orion server is on a virtual machine, create a snapshot or copy of your VM.

If you'd like to use SolarWinds Backup, click here for information.


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