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?

asked 15 May '17, 08:55

Breck%20Carter's gravatar image

Breck Carter
32.5k5407241050
accept rate: 20%

edited 15 May '17, 15:13

Volker%20Barth's gravatar image

Volker Barth
39.9k360547816

1

You could try to validate a heavily modified database, leading to the notorious "false positives"...

(15 May '17, 10:03) Volker Barth
Replies hidden

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?

(16 May '17, 10:27) Breck Carter

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.

permanent link

answered 15 May '17, 10:00

Volker%20Barth's gravatar image

Volker Barth
39.9k360547816
accept rate: 34%

converted 16 May '17, 10:22

Breck%20Carter's gravatar image

Breck Carter
32.5k5407241050

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
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×30

question asked: 15 May '17, 08:55

question was seen: 1,157 times

last updated: 16 May '17, 10:27