|
|||||||||
| Home >> All >> org >> apache >> derby >> iapi >> [ db overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derby.iapi.db
Class ConsistencyChecker

java.lang.Objectorg.apache.derby.iapi.db.ConsistencyChecker
- public class ConsistencyChecker
- extends java.lang.Object
The ConsistencyChecker class provides static methods for verifying the consistency of the data stored within a database.
This class can only be used within an SQL-J statement, a Java procedure or a server side Java method.
This class can be accessed using the class alias CONSISTENCYCHECKER in SQL-J statements.
IBM Corp. reserves the right to change, rename, or remove this class or any of the the methods on the class at any time.
| Constructor Summary | |
private |
ConsistencyChecker()
no requirement for a constructor |
| Method Summary | |
static boolean |
checkTable(java.lang.String schemaName,
java.lang.String tableName)
Check the named table, ensuring that all of its indexes are consistent with the base table. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
ConsistencyChecker
private ConsistencyChecker()
- no requirement for a constructor
| Method Detail |
checkTable
public static boolean checkTable(java.lang.String schemaName, java.lang.String tableName) throws java.sql.SQLException
- Check the named table, ensuring that all of its indexes are consistent
with the base table.
Use this
method only within an SQL-J statement; do not call it directly.
When tables are consistent, the method returns true. Otherwise, the method throws an exception.
To check the consistency of a single table:
VALUES ConsistencyChecker::checkTable(SchemaName, TableName)For example, to check the consistency of the table APP.Flights:
VALUES ConsistencyChecker::checkTable('APP', 'FLIGHTS')To check the consistency of all of the tables in the 'APP' 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.schemaidTo 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
|
|||||||||
| Home >> All >> org >> apache >> derby >> iapi >> [ db overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.derby.iapi.db.ConsistencyChecker