Submit a ticketCall us

AnnouncementsAre You “Flying Blind?”

When it comes to your complex IT infrastructure, you want to ensure you have a good grasp of what’s going on to avoid any fire drills that result from guesswork. Read our white paper to learn how proactively monitoring your IT environment can help your organization while giving you peace of mind.

Get your free white paper.

Home > Success Center > Orion Platform > Orion - Knowledgebase Articles > 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

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

Tags

Classifications

Public