Is the statement validate table logging anywhere its Progress? Can I find anything in the server messages or the request logging?

asked 08 Feb '19, 03:55

Martin's gravatar image

Martin
9.0k130169257
accept rate: 14%

What do you ask for:

  • How to check whether currently a table is validated (by another connection/event, similar to the "BackupInProgress" database property)?
  • How to show the progress messages for a long-lasting validation (if there are any - AFAIK, the "progress_messages" option does not affect validation)?
(08 Feb '19, 07:00) Volker Barth
Replies hidden

the second use Case, getting Messages during a long running validation

(08 Feb '19, 13:02) Martin

I believe progress tracking does not exist for validation.

permanent link

answered 11 Feb '19, 14:49

John%20Smirnios's gravatar image

John Smirnios
11.9k396165
accept rate: 37%

1

You only believe? I'd been sure you got that code... :)

(11 Feb '19, 16:43) Volker Barth
Replies hidden
2

Let's say I looked at the code the code and couldn't find any progress updates. I also don't remember adding progress support when I rewrote validation a long time. So, let's say there's no support for progress tracking but I want weasel words just in case I'm proven wrong :)

(11 Feb '19, 18:00) John Smirnios

As John has pointed out, there are liekly no progress messages available during the validation of one single database object, say one huge table.

However, if you do validate several objects in one go, say via the sa_validate() procedure, and you want to get progress messages telling which object is currently validated, and how long that takes, you can have a look at the "maintenance plans" created for validation with SQL Central:

They contain SQL code that combines the validation of each according object with according MESSAGE statements and results in console output like:

...
I. 13.02 03:04:59. Validation started on 2019-02-13 at 03:04:59.993
I. 13.02 03:04:59. Validating database pages
I. 13.02 03:05:46. Validating table: "dbo"."EXCLUDEOBJECT"
I. 13.02 03:05:46. Validating table: "dbo"."ix_consultant_affected_columns"
...
I. 13.02 xx:xx:xx. Validating table: "SYS"."ISYSWEBSERVICE"
I. 13.02 xx:xx:xx. Validation finished on 2019-02-13 at xx:xx:xx.yyy
I. 13.02 xx:xx:xx. Re-enabling new connections started on 2019-02-13 at xx:xx:xx.yyy

As stated, if a single message per object is sufficient, e.g. to find out what table make take particularly long, I guess that is a good starting point for your own code...

permanent link

answered 14 Feb '19, 07:09

Volker%20Barth's gravatar image

Volker Barth
40.1k361549819
accept rate: 34%

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: 08 Feb '19, 03:55

question was seen: 1,282 times

last updated: 14 Feb '19, 07:09