I'm at a total loss here.
I have a SQL Server database with a central, most critical table, with many, many child tables that have foreign key relationships to it. The foreign key checking is enabled on all tables. I ran EXEC sp_msforeachtable "ALTER TABLE ? WITH CHECK CHECK CONSTRAINT all"
just to be sure.
Yet somehow there are records in multiple child tables that have foreign keys referencing 6 records in the parent table that do not exist.
HOW IS THIS POSSIBLE?
I ran DBCC CHECKDB to see if maybe there was database corruption and I got:
CHECKDB found 0 allocation errors and 0 consistency errors in database 'xxxxxDev'. DBCC execution completed. If DBCC printed error messages, contact your system administrator.