Berkeley DB Java Edition
version 1.5.1

com.sleepycat.je.util
Class DbVerify

java.lang.Object
  |
  +--com.sleepycat.je.util.DbVerify

public class DbVerify
extends Object

Verify the internal structures of a database.

To verify a database and write the errors to stream:

   DbVerify verifier = new DbVerify(env, dbName, quiet);
   verifier.verify();


Constructor Summary
DbVerify(Environment env, String dbName, boolean quiet)
          Create a DbVerify object for a specific environment and database.
 
Method Summary
static void main(String[] argv)
          The main used by the DbVerify utility.
 boolean verify(PrintStream out)
          Verify a database and write errors found to a stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbVerify

public DbVerify(Environment env,
                String dbName,
                boolean quiet)
Create a DbVerify object for a specific environment and database.

Parameters:
env - The Environment containing the database to verify.

dbName - The name of the database to verify.

quiet - true if the verification should not produce errors to the output stream

Method Detail

main

public static void main(String[] argv)
                 throws DatabaseException
The main used by the DbVerify utility.

Parameters:
argv - The arguments accepted by the DbVerify utility.

usage: DbVerify -q -V -s database -h dbEnvHome
       

-V - show the version of the JE library.
-s - specify the database to verify
-h - specify the environment directory
-q - work quietly and don't display errors

Throws:
DatabaseException - if a failure occurs.

verify

public boolean verify(PrintStream out)
               throws DatabaseException
Verify a database and write errors found to a stream.

Parameters:
out - The stream to write errors to.

Returns:
true if the verification found no errors.

DatabaseException

Berkeley DB Java Edition
version 1.5.1

Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.