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, 08:55

Breck%20Carter's gravatar image

Breck Carter
25.6k427586844
accept rate: 20%

edited 15 May, 15:13

Volker%20Barth's gravatar image

Volker Barth
30.3k300452659

1

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

(15 May, 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, 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, 10:00

Volker%20Barth's gravatar image

Volker Barth
30.3k300452659
accept rate: 32%

converted 16 May, 10:22

Breck%20Carter's gravatar image

Breck Carter
25.6k427586844

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, 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:

×27

question asked: 15 May, 08:55

question was seen: 41 times

last updated: 16 May, 10:27