cancel
Showing results for 
Search instead for 
Did you mean: 

Is sa_validate() the same as sa_validate(null, null)?

VolkerBarth
Contributor
2,632

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?

Accepted Solutions (1)

Accepted Solutions (1)

MarkCulp
Participant

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.

VolkerBarth
Contributor
0 Kudos

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

VolkerBarth
Contributor
0 Kudos

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.

Answers (0)