What is the danger of leaving constraint errors in the database?

I had to remove several thousand records from a table that had many FK restrictions. I stopped forced enforcement for all tables and deleted records, and also fixed some obvious restrictions that the DBCC check checked, and then I turned the restrictions back on. After that, the DBCC check still shows some errors, but at the moment I don’t have time to look for why. My question then, as in the title, may be silly, but what can happen if I leave the database for a while with constraint errors? Will an application using this database be affected? Can I remove the restrictions? (I am using SQL Server 2008) thanks

+4
source share
1 answer

You will have data that does not have integrity (there is some invalid information). This will not lead to a database crash or errors, but how the application will respond to this is entirely up to the application. You may see some pages with errors or, even worse, invalid data will be distributed to receive even more invalid data or actions (which may be even more difficult to track and correct afterwards).

The point of these restrictions is to force the database to validate (or reject) data so that the application can rely on certain invalid patterns that do not occur in the data. Many applications are designed to not use these assurances and not to process data integrity, but if your application depended on them, and then you pull them out from under it, it sounds a little dangerous.

+3
source

All Articles