• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt/router/db-4.8.30/docs/api_reference/C/
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4  <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6    <title>DB_ENV-&gt;fileid_reset()</title>
7    <link rel="stylesheet" href="apiReference.css" type="text/css" />
8    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9    <link rel="start" href="index.html" title="Berkeley DB C API Reference" />
10    <link rel="up" href="env.html" title="Chapter��5.�� The DB_ENV Handle" />
11    <link rel="prev" href="envfailchk.html" title="DB_ENV-&gt;failchk()" />
12    <link rel="next" href="envget_create_dir.html" title="DB_ENV-&gt;get_create_dir()" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">DB_ENV-&gt;fileid_reset()</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="envfailchk.html">Prev</a>��</td>
22          <th width="60%" align="center">Chapter��5.��
23                The DB_ENV Handle
24        </th>
25          <td width="20%" align="right">��<a accesskey="n" href="envget_create_dir.html">Next</a></td>
26        </tr>
27      </table>
28      <hr />
29    </div>
30    <div class="sect1" lang="en" xml:lang="en">
31      <div class="titlepage">
32        <div>
33          <div>
34            <h2 class="title" style="clear: both"><a id="envfileid_reset"></a>DB_ENV-&gt;fileid_reset()</h2>
35          </div>
36        </div>
37      </div>
38      <pre class="programlisting">#include &lt;db.h&gt;
39
40int
41DB_ENV-&gt;fileid_reset(DB_ENV *dbenv, const char *file, u_int32_t flags);  </pre>
42      <p>
43         The <code class="methodname">DB_ENV-&gt;fileid_reset()</code> method allows database files to be copied,
44         and then the copy used in the same database environment as the
45         original.
46    </p>
47      <p>
48         All databases contain an ID string used to identify the database in
49         the database environment cache.  If a physical database file is
50         copied, and used in the same environment as another file with the same
51         ID strings, corruption can occur.  The <code class="methodname">DB_ENV-&gt;fileid_reset()</code> method
52         creates new ID strings for all of the databases in the physical file.
53    </p>
54      <p>
55         The <code class="methodname">DB_ENV-&gt;fileid_reset()</code> method modifies the physical file,
56         in-place. Applications should not reset IDs in files that are
57         currently in use.
58    </p>
59      <p>
60         The <code class="methodname">DB_ENV-&gt;fileid_reset()</code> method may be called at any time during
61         the life of the application.
62    </p>
63      <p>
64         The <code class="methodname">DB_ENV-&gt;fileid_reset()</code> <span>
65            <span>
66                  method returns a non-zero error value on failure and 0 on success.
67            </span>
68            
69        </span>
70    </p>
71      <div class="sect2" lang="en" xml:lang="en">
72        <div class="titlepage">
73          <div>
74            <div>
75              <h3 class="title"><a id="id1662597"></a>Parameters</h3>
76            </div>
77          </div>
78        </div>
79        <div class="sect3" lang="en" xml:lang="en">
80          <div class="titlepage">
81            <div>
82              <div>
83                <h4 class="title"><a id="id1662486"></a>file</h4>
84              </div>
85            </div>
86          </div>
87          <p>
88                          The name of the physical file in which new file IDs are to be created.
89                     </p>
90        </div>
91        <div class="sect3" lang="en" xml:lang="en">
92          <div class="titlepage">
93            <div>
94              <div>
95                <h4 class="title"><a id="id1662701"></a>flags</h4>
96              </div>
97            </div>
98          </div>
99          <p>
100                          The <span class="bold"><strong>flags</strong></span> parameter must be set to 0
101                          or the following value:
102                     </p>
103          <div class="itemizedlist">
104            <ul type="disc">
105              <li>
106                <p>
107                        <code class="literal">DB_ENCRYPT</code>
108                    </p>
109                <p>
110                        The file contains encrypted databases.
111                    </p>
112              </li>
113            </ul>
114          </div>
115        </div>
116      </div>
117      <div class="sect2" lang="en" xml:lang="en">
118        <div class="titlepage">
119          <div>
120            <div>
121              <h3 class="title"><a id="id1662778"></a>Errors</h3>
122            </div>
123          </div>
124        </div>
125        <p>
126                         The <code class="methodname">DB_ENV-&gt;fileid_reset()</code> <span>
127            <span>
128                 method may fail and return one of the following non-zero errors:
129            </span>
130            
131        </span>
132                    </p>
133        <div class="sect3" lang="en" xml:lang="en">
134          <div class="titlepage">
135            <div>
136              <div>
137                <h4 class="title"><a id="id1662793"></a>EINVAL</h4>
138              </div>
139            </div>
140          </div>
141          <p>
142                An invalid flag value or parameter was specified.
143            </p>
144        </div>
145      </div>
146      <div class="sect2" lang="en" xml:lang="en">
147        <div class="titlepage">
148          <div>
149            <div>
150              <h3 class="title"><a id="id1662780"></a>Class</h3>
151            </div>
152          </div>
153        </div>
154        <p>
155                <a class="link" href="env.html" title="Chapter��5.�� The DB_ENV Handle">DB_ENV</a>  
156            </p>
157      </div>
158      <div class="sect2" lang="en" xml:lang="en">
159        <div class="titlepage">
160          <div>
161            <div>
162              <h3 class="title"><a id="id1662791"></a>See Also</h3>
163            </div>
164          </div>
165        </div>
166        <p>
167                     <a class="xref" href="env.html#envlist" title="Database Environments and Related Methods">Database Environments and Related Methods</a> 
168                </p>
169      </div>
170    </div>
171    <div class="navfooter">
172      <hr />
173      <table width="100%" summary="Navigation footer">
174        <tr>
175          <td width="40%" align="left"><a accesskey="p" href="envfailchk.html">Prev</a>��</td>
176          <td width="20%" align="center">
177            <a accesskey="u" href="env.html">Up</a>
178          </td>
179          <td width="40%" align="right">��<a accesskey="n" href="envget_create_dir.html">Next</a></td>
180        </tr>
181        <tr>
182          <td width="40%" align="left" valign="top">DB_ENV-&gt;failchk()��</td>
183          <td width="20%" align="center">
184            <a accesskey="h" href="index.html">Home</a>
185          </td>
186          <td width="40%" align="right" valign="top">��DB_ENV-&gt;get_create_dir()</td>
187        </tr>
188      </table>
189    </div>
190  </body>
191</html>
192