mirror of
https://github.com/MariaDB/server.git
synced 2025-11-09 11:41:36 +03:00
51 lines
3.5 KiB
HTML
51 lines
3.5 KiB
HTML
<!--$Id: verify.so,v 10.3 2000/12/18 21:05:14 bostic Exp $-->
|
|
<!--Copyright 1997, 1998, 1999, 2000 by Sleepycat Software, Inc.-->
|
|
<!--All rights reserved.-->
|
|
<html>
|
|
<head>
|
|
<title>Berkeley DB Reference Guide: Database verification and salvage</title>
|
|
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
|
|
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
|
|
</head>
|
|
<body bgcolor=white>
|
|
<a name="2"><!--meow--></a> <a name="3"><!--meow--></a> <a name="4"><!--meow--></a>
|
|
<table><tr valign=top>
|
|
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Access Methods</dl></h3></td>
|
|
<td width="1%"><a href="../../ref/am/partial.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/am/error.html"><img src="../../images/next.gif" alt="Next"></a>
|
|
</td></tr></table>
|
|
<p>
|
|
<h1 align=center>Database verification and salvage</h1>
|
|
<p>The <a href="../../api_c/db_verify.html">DB->verify</a> method is the standard interface for verifying
|
|
that a file, and any databases it may contain, are uncorrupted. In
|
|
addition, the method may optionally be called with a file stream
|
|
argument to which all key/data pairs found in the database are output.
|
|
There are two modes for finding key/data pairs to be output:
|
|
<p><ol>
|
|
<p><li>If the <a href="../../api_c/db_verify.html#DB_SALVAGE">DB_SALVAGE</a> flag is specified, the key/data pairs in the
|
|
database are output. When run in this mode, the database is assumed to
|
|
be largely uncorrupted. For example, the <a href="../../api_c/db_verify.html">DB->verify</a> method will
|
|
search for pages that are no longer linked into the database, and will
|
|
output key/data pairs from such pages. However, key/data items that
|
|
have been marked as deleted in the database will not be output, as the
|
|
page structures are generally trusted in this mode.
|
|
<p><li>If both the <a href="../../api_c/db_verify.html#DB_SALVAGE">DB_SALVAGE</a> and <a href="../../api_c/db_verify.html#DB_AGGRESSIVE">DB_AGGRESSIVE</a> flags are
|
|
specified, all possible key/data pairs are output. When run in this mode,
|
|
the database is assumed to be seriously corrupted. For example, key/data
|
|
pairs that have been deleted will re-appear in the output. In addition,
|
|
because pages may have been subsequently re-used and modified during
|
|
normal database operations after the key/data pairs were deleted, it is
|
|
not uncommon for apparently corrupted key/data pairs to be output in this
|
|
mode, even when there is no corruption in the underlying database. The
|
|
output will almost always have to be edited by hand or other means before
|
|
the data is ready for re-load into another database. We recommend that
|
|
<a href="../../api_c/db_verify.html#DB_SALVAGE">DB_SALVAGE</a> be tried first, and <a href="../../api_c/db_verify.html#DB_AGGRESSIVE">DB_AGGRESSIVE</a> only tried
|
|
if the output from that first attempt is obviously missing data items or
|
|
the data is sufficiently valuable that human review of the output is
|
|
preferable to any kind of data loss.
|
|
</ol>
|
|
<table><tr><td><br></td><td width="1%"><a href="../../ref/am/partial.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/am/error.html"><img src="../../images/next.gif" alt="Next"></a>
|
|
</td></tr></table>
|
|
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
|
|
</body>
|
|
</html>
|