Friends,
A customer of ours had to do a DBCC CHECKDB REPAIR_ALLOW_DATA_LOSS after
discovering inconsistencies after a catastrophic power failure. (They
didn't even suspect trouble until weeks later, and at this point all backups
contain the inconsistencies.) The DBCC command now completes without
errors, but we worry that data (actual "row" data, not just index data)
might have been lost. We also worry about resulting integrity problems,
orphaned foreign key references, etc.
It appears that the command DBCC CHECKCONSTRAINTS WITH ALL_ERRORMSGS might
be the command we are looking for. If we understand things correctly, it
will report rows that violate some constraint.
Is our thinking correct here? Will system tables and constraints be checked
too? Is there anything else we should be concerned about? (Other than lost
business data, and a UPS for the customer, of course.)
Any words, links, and thoughts of your will be very much appreciated.
Thanks in advance for your time!
James Hunter Ross
Senior Software Developer
O'Neil Software, Inc.Hi
DBCC CHECKCONSTRAINTS will check the integrity of CHECK constraints and FKs
wrt to the data that is present, but it won't tell you if consistencies not
enforced in the database are still correct or if both referenced/referencing
data is missing. If you have copies of historical reports you may want to ru
n
them to compare what they returned previously and now.
John
"James Hunter Ross" wrote:
> Friends,
> A customer of ours had to do a DBCC CHECKDB REPAIR_ALLOW_DATA_LOSS after
> discovering inconsistencies after a catastrophic power failure. (They
> didn't even suspect trouble until weeks later, and at this point all backu
ps
> contain the inconsistencies.) The DBCC command now completes without
> errors, but we worry that data (actual "row" data, not just index data)
> might have been lost. We also worry about resulting integrity problems,
> orphaned foreign key references, etc.
> It appears that the command DBCC CHECKCONSTRAINTS WITH ALL_ERRORMSGS might
> be the command we are looking for. If we understand things correctly, it
> will report rows that violate some constraint.
> Is our thinking correct here? Will system tables and constraints be check
ed
> too? Is there anything else we should be concerned about? (Other than lo
st
> business data, and a UPS for the customer, of course.)
> Any words, links, and thoughts of your will be very much appreciated.
> Thanks in advance for your time!
> James Hunter Ross
> Senior Software Developer
> O'Neil Software, Inc.
>
>
Tuesday, February 14, 2012
DBCC CHECKCONSTRAINTS WITH ALL_ERRORMSGS...
Labels:
afterdiscovering,
all_errormsgs,
catastrophic,
checkconstraints,
checkdb,
customer,
database,
dbcc,
failure,
friends,
inconsistencies,
microsoft,
mysql,
oracle,
ours,
power,
repair_allow_data_loss,
server,
sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment