DbStatpublic class DbVerify
extends java.lang.Object
When using this utility as a command line program, and the application uses custom key comparators, be sure to add the jars or classes to the classpath that contain the application's comparator classes.
To verify a database and write the errors to stream:
DbVerify verifier = new DbVerify(env, dbName, quiet);
verifier.verify();
| Constructor | Description |
|---|---|
DbVerify(Environment env,
java.lang.String dbName,
boolean quiet) |
Deprecated.
|
| Modifier and Type | Method | Description |
|---|---|---|
static void |
main(java.lang.String[] argv) |
The main used by the DbVerify utility.
|
boolean |
verify(java.io.PrintStream out) |
Deprecated.
|
public DbVerify(Environment env, java.lang.String dbName, boolean quiet)
Environment.verify(com.sleepycat.je.VerifyConfig, java.io.PrintStream) or
Database.verify(com.sleepycat.je.VerifyConfig) instead. These methods allow
specifying all VerifyConfig properties.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 streampublic static void main(java.lang.String[] argv)
throws DatabaseException
argv - The arguments accepted by the DbVerify utility.
usage: java { com.sleepycat.je.util.DbVerify | -jar
je-<version>.jar DbVerify }
[-q] [-V] -s database -h dbEnvHome [-v progressInterval]
[-bs batchSize] [-d delayMs] [-vdr]
-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
-v - report intermediate statistics every progressInterval Leaf Nodes
-bs - specify how many records to check each batch
-d - specify the delay in ms between batches
-vdr - verify data records (read LNs)
-vor - verify obsolete records (cleaner metadata)
Note that the DbVerify command line cannot be used to verify the
integrity of secondary databases, because this feature requires the
secondary databases to have been opened by the application. To verify
secondary database integrity, use Environment.verify(com.sleepycat.je.VerifyConfig, java.io.PrintStream) or
Database.verify(com.sleepycat.je.VerifyConfig) instead, from within the
application.
EnvironmentFailureException - if an unexpected, internal or
environment-wide failure occurs.DatabaseExceptionpublic boolean verify(java.io.PrintStream out)
throws DatabaseException
Environment.verify(com.sleepycat.je.VerifyConfig, java.io.PrintStream) or
Database.verify(com.sleepycat.je.VerifyConfig) instead. These methods allow
specifying all VerifyConfig properties.out - The stream to write errors to.EnvironmentFailureException - if an environment corruption is
detected, or if an unexpected, internal or environment-wide failure
occurs. If a persistent corruption is detected,
EnvironmentFailureException.isCorrupted() will return true.CorruptSecondariesException - if an environment corruption is
not detected, but one more more corrupt SecondaryDatabases is
detected. The exception contains information about the corrupt
databases. The Environment is not invalidated, but note that SecondaryIntegrityException will be thrown when attempting to access
a corrupt SecondaryDatabase and it should be closed.DatabaseExceptionCopyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved.