public class VerifyConfig
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static VerifyConfig |
DEFAULT |
Default configuration used if null is passed to
Database.verify . |
Constructor | Description |
---|---|
VerifyConfig() |
An instance created using the default constructor is initialized
with the system's default settings.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
getAggressive() |
Return true if the
Database.verify is configured to output
all the key/data pairs in the file that can be found. |
boolean |
getNoOrderCheck() |
Return true if the
Database.verify is configured to skip the
database checks for btree and duplicate sort order and for hashing. |
boolean |
getOrderCheckOnly() |
Return true if the
Database.verify is configured to do database
checks for btree and duplicate sort order and for hashing, skipped
by verification operations configured by VerifyConfig.setNoOrderCheck . |
boolean |
getPrintable() |
Return true if the
Database.verify is configured to use printing
characters to where possible. |
boolean |
getSalvage() |
Return true if the
Database.verify is configured to write the
key/data pairs from all databases in the file to the file stream
named by the outfile parameter.. |
void |
setAggressive(boolean aggressive) |
Configure
Database.verify to output all the
key/data pairs in the file that can be found. |
void |
setNoOrderCheck(boolean noOrderCheck) |
Configure
Database.verify to skip the database checks for
btree and duplicate sort order and for hashing. |
void |
setOrderCheckOnly(boolean orderCheckOnly) |
Configure
Database.verify to do database checks for btree
and duplicate sort order and for hashing, skipped by verification
operations configured by VerifyConfig.setNoOrderCheck . |
void |
setPrintable(boolean printable) |
Configure
Database.verify to use printing characters to
where possible. |
void |
setSalvage(boolean salvage) |
Configure
Database.verify to write the key/data pairs from
all databases in the file to the file stream named by the outfile
parameter. |
public static final VerifyConfig DEFAULT
Database.verify
.public VerifyConfig()
public void setAggressive(boolean aggressive)
Database.verify
to output all the
key/data pairs in the file that can be found.
By default, Database.verify
does not assume corruption.
For example, if a key/data pair on a page is marked as deleted, it
is not then written to the output file. When Database.verify
is configured with this method, corruption is assumed, and
any key/data pair that can be found is written. In this case,
key/data pairs that are corrupted or have been deleted may appear
in the output (even if the file being salvaged is in no way
corrupt), and the output will almost certainly require editing
before being loaded into a database.
aggressive
- If true, configure Database.verify
to output all
the key/data pairs in the file that can be found.public boolean getAggressive()
Database.verify
is configured to output
all the key/data pairs in the file that can be found.
This method may be called at any time during the life of the application.
Database.verify
is configured to output
all the key/data pairs in the file that can be found.public void setNoOrderCheck(boolean noOrderCheck)
Database.verify
to skip the database checks for
btree and duplicate sort order and for hashing.
Database.verify
normally verifies that btree keys and
duplicate items are correctly sorted, and hash keys are correctly
hashed. If the file being verified contains multiple databases
using differing sorting or hashing algorithms, some of them must
necessarily fail database verification because only one sort order
or hash function can be specified before Database.verify
is called. To verify files with multiple databases having differing
sorting orders or hashing functions, first perform verification of
the file as a whole using Database.verify
configured with
VerifyConfig.setNoOrderCheck
, and then individually verify
the sort order and hashing function for each database in the file
using 4_link(Database, verify) configured with VerifyConfig.setOrderCheckOnly
.
noOrderCheck
- If true, configure Database.verify
to skip the database
checks for btree and duplicate sort order and for hashing.public boolean getNoOrderCheck()
Database.verify
is configured to skip the
database checks for btree and duplicate sort order and for hashing.
This method may be called at any time during the life of the application.
Database.verify
is configured to skip the
database checks for btree and duplicate sort order and for hashing.public void setOrderCheckOnly(boolean orderCheckOnly)
Database.verify
to do database checks for btree
and duplicate sort order and for hashing, skipped by verification
operations configured by VerifyConfig.setNoOrderCheck
.
When this flag is specified, a database name must be specified to
Database.verify
, indicating the database in the physical
file which is to be checked.
This configuration is only safe to use on databases that have
already successfully been verified with VerifyConfig.setNoOrderCheck
configured.
orderCheckOnly
- If true, configure Database.verify
to do database checks
for btree and duplicate sort order and for hashing, skipped by
verification operations configured by VerifyConfig.setNoOrderCheck
.public boolean getOrderCheckOnly()
Database.verify
is configured to do database
checks for btree and duplicate sort order and for hashing, skipped
by verification operations configured by VerifyConfig.setNoOrderCheck
.
This method may be called at any time during the life of the application.
Database.verify
is configured to do database
checks for btree and duplicate sort order and for hashing, skipped
by verification operations configured by VerifyConfig.setNoOrderCheck
.public void setPrintable(boolean printable)
Database.verify
to use printing characters to
where possible.
This method is only meaningful when combined with
VerifyConfig.setSalvage
.
This configuration permits users to use standard text editors and tools to modify the contents of databases or selectively remove data from salvager output.
Note: different systems may have different notions about what characters are considered printing characters, and databases dumped in this manner may be less portable to external systems.
printable
- If true, configure Database.verify
to use printing
characters to where possible.public boolean getPrintable()
Database.verify
is configured to use printing
characters to where possible.
This method may be called at any time during the life of the application.
Database.verify
is configured to use printing
characters to where possible.public void setSalvage(boolean salvage)
Database.verify
to write the key/data pairs from
all databases in the file to the file stream named by the outfile
parameter.
The output format is the same as that specified for the db_dump utility, and can be used as input for the db_load utility.
Because the key/data pairs are output in page order as opposed to the
sort order used by db_dump, using Database.verify
to dump
key/data pairs normally produces less than optimal loads for Btree
databases.
salvage
- If true, configure Database.verify
to write the key/data
pairs from all databases in the file to the file stream named by the
outfile parameter.public boolean getSalvage()
Database.verify
is configured to write the
key/data pairs from all databases in the file to the file stream
named by the outfile parameter..
This method may be called at any time during the life of the application.
Database.verify
is configured to write the
key/data pairs from all databases in the file to the file stream
named by the outfile parameter..Copyright (c) 1996, 2020 Oracle and/or its affiliates. All rights reserved.