Checking Database Consistency,
Page 4 of 4


[top]
[prev]
[next]
Index for This Book
Table of Contents
Documentation Top
Global Index

Sample Queries

This section provides examples that illustrate using checkTable in queries.

Check the consistency of a single table:

VALUES ConsistencyChecker.checkTable('APP', 'FLIGHTS')

Check the consistency of all of the tables in a schema, stopping at the first failure:

SELECT tablename, ConsistencyChecker.checkTable(
    'APP', tablename)
FROM sys.sysschemas s, sys.systables t
WHERE s.schemaname = 'APP' AND s.schemaid = t.schemaid

Check the consistency of an entire database, stopping at the first failure:

SELECT schemaname, tablename,
ConsistencyChecker.checkTable(schemaname, tablename)
FROM sys.sysschemas s, sys.systables t
WHERE s.schemaid = t.schemaid

NOTE: See the sample program JBMSTours.AdminHelper for an example of running the consistency checker.

[top]
[prev]
[next]


Cloudscape Version 3.0
For technical support, go to: www.cloudscape.com and click Support.
Copyright © 1998 and 1999 Cloudscape, Inc. All rights reserved.