Debian Codegraph @

docs/api_reference/C/envfileid_reset.html

raw symbols SCIP
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="envfullversion.html" title="db_full_version" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">DB_ENV-&gt;fileid_reset()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="envfailchk.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 5. 
26 The DB_ENV Handle
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="envfullversion.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title" style="clear: both"><a id="envfileid_reset"></a>DB_ENV-&gt;fileid_reset()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db.h&gt;
42
43 int
44 DB_ENV-&gt;fileid_reset(DB_ENV *dbenv, const char *file, u_int32_t flags); </pre>
45 <p>
46 The <code class="methodname">DB_ENV-&gt;fileid_reset()</code> method allows database files to be copied,
47 and then the copy used in the same database environment as the
48 original.
49 </p>
50 <p>
51 All databases contain an ID string used to identify the database in
52 the database environment cache. If a physical database file is
53 copied, and used in the same environment as another file with the same
54 ID strings, corruption can occur. The <code class="methodname">DB_ENV-&gt;fileid_reset()</code> method
55 creates new ID strings for all of the databases in the physical file.
56 </p>
57 <p>
58 The <code class="methodname">DB_ENV-&gt;fileid_reset()</code> method modifies the physical file,
59 in-place. Applications should not reset IDs in files that are
60 currently in use.
61 </p>
62 <p>
63 The <code class="methodname">DB_ENV-&gt;fileid_reset()</code> method may be called at any time during
64 the life of the application.
65 </p>
66 <p>
67 The <code class="methodname">DB_ENV-&gt;fileid_reset()</code> <span>
68 <span>
69 method returns a non-zero error value on failure and 0 on success.
70 </span>
71
72 </span>
73 </p>
74 <div class="sect2" lang="en" xml:lang="en">
75 <div class="titlepage">
76 <div>
77 <div>
78 <h3 class="title"><a id="idp51405560"></a>Parameters</h3>
79 </div>
80 </div>
81 </div>
82 <div class="sect3" lang="en" xml:lang="en">
83 <div class="titlepage">
84 <div>
85 <div>
86 <h4 class="title"><a id="idp51405128"></a>file</h4>
87 </div>
88 </div>
89 </div>
90 <p>
91 The name of the physical file in which new file IDs are to be created.
92 </p>
93 </div>
94 <div class="sect3" lang="en" xml:lang="en">
95 <div class="titlepage">
96 <div>
97 <div>
98 <h4 class="title"><a id="idp51429616"></a>flags</h4>
99 </div>
100 </div>
101 </div>
102 <p>
103 The <span class="bold"><strong>flags</strong></span> parameter must be set to 0
104 or the following value:
105 </p>
106 <div class="itemizedlist">
107 <ul type="disc">
108 <li>
109 <p>
110 <code class="literal">DB_ENCRYPT</code>
111 </p>
112 <p>
113 The file contains encrypted databases.
114 </p>
115 </li>
116 </ul>
117 </div>
118 </div>
119 </div>
120 <div class="sect2" lang="en" xml:lang="en">
121 <div class="titlepage">
122 <div>
123 <div>
124 <h3 class="title"><a id="idp51430800"></a>Errors</h3>
125 </div>
126 </div>
127 </div>
128 <p>
129 The <code class="methodname">DB_ENV-&gt;fileid_reset()</code> <span>
130 <span>
131 method may fail and return one of the following non-zero errors:
132 </span>
133
134 </span>
135 </p>
136 <div class="sect3" lang="en" xml:lang="en">
137 <div class="titlepage">
138 <div>
139 <div>
140 <h4 class="title"><a id="idp51435696"></a>EINVAL</h4>
141 </div>
142 </div>
143 </div>
144 <p>
145 An invalid flag value or parameter was specified.
146 </p>
147 </div>
148 </div>
149 <div class="sect2" lang="en" xml:lang="en">
150 <div class="titlepage">
151 <div>
152 <div>
153 <h3 class="title"><a id="idp51433752"></a>Class</h3>
154 </div>
155 </div>
156 </div>
157 <p>
158 <a class="link" href="env.html" title="Chapter 5.  The DB_ENV Handle">DB_ENV</a>
159 </p>
160 </div>
161 <div class="sect2" lang="en" xml:lang="en">
162 <div class="titlepage">
163 <div>
164 <div>
165 <h3 class="title"><a id="idp51436776"></a>See Also</h3>
166 </div>
167 </div>
168 </div>
169 <p>
170 <a class="xref" href="env.html#envlist" title="Database Environments and Related Methods">Database Environments and Related Methods</a>
171 </p>
172 </div>
173 </div>
174 <div class="navfooter">
175 <hr />
176 <table width="100%" summary="Navigation footer">
177 <tr>
178 <td width="40%" align="left"><a accesskey="p" href="envfailchk.html">Prev</a> </td>
179 <td width="20%" align="center">
180 <a accesskey="u" href="env.html">Up</a>
181 </td>
182 <td width="40%" align="right"> <a accesskey="n" href="envfullversion.html">Next</a></td>
183 </tr>
184 <tr>
185 <td width="40%" align="left" valign="top">DB_ENV-&gt;failchk() </td>
186 <td width="20%" align="center">
187 <a accesskey="h" href="index.html">Home</a>
188 </td>
189 <td width="40%" align="right" valign="top"> db_full_version</td>
190 </tr>
191 </table>
192 </div>
193 </body>
194 </html>