sa_validate system procedure

Function

Validates all tables in the catalog store.

Syntax

sa_validate [ tbl_name, ] [ owner_name, ] [ check_type ]

Permissions

DBA authority required. Users without DBA authority must be granted EXECUTE permission to run the stored procedure.

Description

This procedure validates each SQL Anywhere table or index in the catalog store.

For more information, see “Validation utility (dbvalid)” in Chapter 3, “Database Administration Utilities” in the Utility Guide.

Table 7-76 lists the meaning of the sa_validate parameters.

Table 7-76: sa_validate options

Option name

Values

tbl_name

Validate only the specified table. When NULL (the default), validate all tables.

owner_name

Validate only the tables owned by the specified user. When NULL (the default), validate tables for all users.

check_type

When NULL (the default), each table is checked without additional checks. The check_type value can be one of the following: data, express, full, index, or checksum.

Values for the tbl_name, owner_name, and check_type parameters are strings and must be enclosed in quotes.

The procedure returns a single column, named Messages. If all tables are valid, the column contains:

No errors detected

WARNING! Validate a table or the entire catalog store while no connections are making changes to the database; otherwise, spurious errors might be reported, indicating some form of database corruption even though no corruption actually exists.

Example

The following statement validates all of the catalog store tables with an index check owned by the DBA:

CALL sa_validate (owner_name='DBA', check_type = 'index')