Validates all, or parts, of a database.
sa_validate( [ [ owner_name.]tbl_name | owner_name ] )
tbl_name Use this optional VARCHAR(128) parameter to specify the name of a table or materialized view to validate.
owner_name Use this optional VARCHAR(128) parameter to specify an owner. When specified by itself, all tables and materialized views owned by the owner are validated.
DBA authority required
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.
The values for tbl_name and owner_name are strings and must be enclosed in quotes.
The procedure returns a single column named Messages. Errors returned during validation appear in the column. If validation
succeeds without error, the column contains
No error detected.
Validating a table or an entire database should be performed while no connections are making changes to the database; otherwise, errors may be reported indicating some form of database corruption even though no corruption actually exists.
The following statement performs a validation of tables and materialized views owned by DBA:
CALL sa_validate( owner_name = 'DBA' );
|Send feedback about this page via email or DocCommentXchange||Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0|