Validates the current database, or a single table, materialized view, or index in the IQ catalog (system) store.
Quick Links:
Syntax 1 – Validating a database
VALIDATE { CHECKSUM | DATABASE }
Syntax 2 – Validating tables and materialized views
VALIDATE { TABLE [ owner.]table-name | MATERIALIZED VIEW [ owner.]materialized-view-name } [ WITH EXPRESS CHECK ]
VALIDATE { INDEX index-name | [ INDEX ] FOREIGN KEY role-name | [ INDEX ] PRIMARY KEY } ON [ owner.]object-name object-name table-name | materialized-view-name
Syntax 4 – Validating text indexes
VALIDATE TEXT INDEX index-name ON [ owner.]table-name
The CHECKSUM clause is not recommended for databases that have checksums disabled because it reads the entire database from disk.
The DATABASE clause brings pages into the database server's cache in sequential order. This results in their validation, as the database server always verifies the contents and checksums of pages brought into the cache. If you start database validation while the database cleaner is running, the validation does not run until the database cleaner is finished running.
For foreign key indexes, unless the WITH EXPRESS CHECK clause is specified, each value is looked up in the primary key table to verify that referential integrity is intact. Because the TABLE clause, like the DATABASE clause, uses the database server's cache, the database server also verifies the checksums and basic validity of all pages in use by a table and its indexes.
For foreign key indexes, unless the WITH EXPRESS CHECK clause is specified, each value is looked up in the primary key table to verify that referential integrity is intact. Specifying the WITH EXPRESS CHECK clause disables referential integrity checking and can therefore significantly improve performance. If the specified index is not a foreign key index, WITH EXPRESS CHECK has no effect.