Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

Hi all,

according to the SA 11 and above docs, there seems to be a (slight) difference between running

call sa_validate();

and

call sa_validate(null, null);

From the SA 11.0.1 docs:

If you specify sa_validate() (no arguments), the database server validates all tables, materialized views, indexes, checksums, and the database file.

If neither owner nor tbl_name are specified, all tables and materialized views in the database are validated. Also, the database itself is validated, including checksum validation, and validation that the number of rows in the each table or materialized view matches the number of rows in each associated index.

(Frankly, I can't tell whether both descriptions mean the same thing...)

But in my SQL understanding, both calls should do exactly the same, as all parameters of sa_validate are declared with null as default, and so both calls should be equivalent (and in my tests, they run equally long).

So what's the difference between both calls?

asked 28 Jun '10, 13:44

Volker%20Barth's gravatar image

Volker Barth
40.5k365556827
accept rate: 34%

edited 28 Jun '10, 20:04

1

It certainly reads like the same things happen in both cases, but if that's true, why do they explain the two cases separately - maybe it's an artifact of the process of editing the article over the years?

(28 Jun '10, 16:48) Justin Willey

@Justin: I have been unsure about the index part, i.e. whether "validating indexes" means validating "that the number of rows in the each table or materialized view matches the number of rows in each associated index". But as Mark states, this is the case.

(28 Jun '10, 20:07) Volker Barth

The statement:

call sa_validate()

and the statement

call sa_validate( null, null );

are equivalent.

As for the documentation, it does seem a bit strange that it would say the same thing twice but in different ways. I believe that Justin is correct and it just an historical thing. I have sent a note to the doc team to remove the duplication.

permanent link

answered 28 Jun '10, 17:51

Mark%20Culp's gravatar image

Mark Culp
25.0k10142298
accept rate: 41%

Thanks - I agree with Justin and you. And I'm pleased to get "officially confirmed" that my reading of the procedure's signature is right:)

(28 Jun '10, 20:04) Volker Barth

FWIW: As Mark has announced, the first cited statement in my question has been removed from the DCX version of the SA 12 docs, cf. http://dcx.sybase.com/index.html#1200en/dbreference/sa-validate-sysproc.html.

(15 Oct '10, 10:04) Volker Barth
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:

×143
×36
×30

question asked: 28 Jun '10, 13:44

question was seen: 2,426 times

last updated: 28 Jun '10, 20:04