Does it raise an exception? ( or can someone tell me how to force an error? ) For example, the dbvalid.exe utility appears to run VALIDATE TABLE statements, and is able to determine "No errors reported"... how? |
Dbvalid might use sa_validate(), as that does return its success as text (with v17 adding a "bValid" bit to allow for language-agnostic success evaluation.). Cf. that FAQ. The code for sa_validate() reveals that yes indeed, VALIDATE TABLE reports problems via raised exceptions, and also shows how to use CREATE PROCEDURE ON EXCEPTION RESUME to capture all the exceptions in a loop... thank you!
(16 May '17, 10:25)
Breck Carter
|
You could try to validate a heavily modified database, leading to the notorious "false positives"...
Excellent suggestion! ...except it's not easy to do with a small demo database, apparently.
Does anyone know how to easily force a false positive on VALIDATE TABLE, or does it only work on the VALIDATE DATABASE thing?