Chapter 7. Command-Line Scripts
282
db2index -n userRoot -t cn -t givenname
• Reindex
cn
in the database where the root suffix is
dc=example,dc=com
:
db2index -s "dc=example,dc=com" -t cn
Options
Option
Description
-n
backendInstance
Gives the name of the instance to be reindexed.
-s
includeSuffix
Gives suffixes to be included or the subtrees to
be included if
-n
has been used.
-t
attributeName{:indextypes(:mathingrules)}
Names of the attributes to be reindexed.
Optionally, this can include the index type (
eq
,
pres
,
sub
,
approx
) and a matching rule OID.
-T
vlvAttributeName
Gives the names of the VLV attributes to be
reindexed. The name is the VLV index object's
common name in
cn=config
.
Table 7.7. db2index Options
7.3.6. dbverify (Checks for Corrupt Databases)
Verifies the backend database files. If the server crashes because of a corrupted database, this
command can be used to verify the integrity of the different database files to help isolate any
problems.
IMPORTANT
Never
run
dbverify
when a modify operation is in progress. This command calls the
BerkeleyDB utility
db_verify
and does not perform any locking. This can lead to data
corruption if the script is run at the same time as a modify. If that occurs, an entry will be
recorded in the error log:
DB ERROR: db_verify: Page 3527: out-of-order key at entry 42
DB ERROR: db_verify: DB->verify: db/mstest2/uid.db4: DB_VERIFY_BAD: Database
verification failed
Secondary index file uid.db4 in db/mstest2 is corrupted.
Please run db2index(.pl) for reindexing.
Run
db2index -t uid
to avoid rebuilding all of the indexes or export and reimport all of
the databases using
db2ldif
and
ldif2db
.
dbverify
is a shell script wrapper of
verify-db.pl
to set the appropriate library path.
Syntax
dbverify
[ -a
/path/to/database_directory
]
Содержание 8.1
Страница 8: ...viii ...
Страница 14: ...xiv ...
Страница 16: ...2 ...
Страница 250: ...236 ...
Страница 334: ...320 ...
Страница 372: ...358 ...