1<!--$Id: env_set_tx_timestamp.so,v 10.29 2004/09/28 15:04:23 bostic Exp $-->
2<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
3<!--See the file LICENSE for redistribution information.-->
4<html>
5<head>
6<title>Berkeley DB: DB_ENV-&gt;set_tx_timestamp</title>
7<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
9</head>
10<body bgcolor=white>
11<table width="100%"><tr valign=top>
12<td>
13<b>DB_ENV-&gt;set_tx_timestamp</b>
14</td>
15<td align=right>
16<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a>
17<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
18</tr></table>
19<hr size=1 noshade>
20<tt>
21<b><pre>
22#include &lt;db.h&gt;
23<p>
24int
25DB_ENV-&gt;set_tx_timestamp(DB_ENV *dbenv, time_t *timestamp);
26<p>
27int
28DB_ENV-&gt;get_tx_timestamp(DB_ENV *dbenv, time_t *timestampp);
29</pre></b>
30<hr size=1 noshade>
31<b>Description: DB_ENV-&gt;set_tx_timestamp</b>
32<p>Recover to the time specified by <b>timestamp</b> rather than to the
33most current possible date.</p>
34<p>Once a database environment has been upgraded to a new version of Berkeley DB
35involving a log format change (see <a href="../ref/upgrade/process.html">Upgrading Berkeley DB installations</a>), it is no longer possible to recover
36to a specific time before that upgrade.</p>
37<p>The DB_ENV-&gt;set_tx_timestamp method configures operations performed using the specified
38<a href="../api_c/env_class.html">DB_ENV</a> handle, not all operations performed on the underlying
39database environment.</p>
40<p>The DB_ENV-&gt;set_tx_timestamp method may not be called after the <a href="../api_c/env_open.html">DB_ENV-&gt;open</a> method is
41called.
42</p>
43<p>The DB_ENV-&gt;set_tx_timestamp method
44returns a non-zero error value on failure
45and 0 on success.
46</p>
47<b>Parameters</b> <br>
48 <b>timestamp</b><ul compact><li>The <b>timestamp</b> parameter references the memory location where the
49recovery timestamp is located.
50<p>The <b>timestamp</b> parameter should be the number of seconds since 0
51hours, 0 minutes, 0 seconds, January 1, 1970, Coordinated Universal
52Time; that is, the Epoch.</p></ul>
53<br>
54<br><b>Errors</b>
55<p>The DB_ENV-&gt;set_tx_timestamp method
56may fail and return one of the following non-zero errors:</p>
57<br>
58<b>EINVAL</b><ul compact><li>If it is not possible to recover to the specified time using the log files
59currently present in the environment; or if an
60invalid flag value or parameter was specified.</ul>
61<br>
62<hr size=1 noshade>
63<b>Description: DB_ENV-&gt;get_tx_timestamp</b>
64<p>The DB_ENV-&gt;get_tx_timestamp method returns the recovery timestamp.</p>
65<p>The DB_ENV-&gt;get_tx_timestamp method may be called at any time during the life of the
66application.</p>
67<p>The DB_ENV-&gt;get_tx_timestamp method
68returns a non-zero error value on failure
69and 0 on success.
70</p>
71<b>Parameters</b> <br>
72 <b>timestampp</b><ul compact><li>The DB_ENV-&gt;get_tx_timestamp method returns  the
73recovery timestamp in <b>timestampp</b>.</ul>
74<br>
75<hr size=1 noshade>
76<br><b>Class</b>
77<a href="../api_c/env_class.html">DB_ENV</a>, <a href="../api_c/txn_class.html">DB_TXN</a>
78<br><b>See Also</b>
79<a href="../api_c/txn_list.html">Transaction Subsystem and Related Methods</a>
80</tt>
81<table width="100%"><tr><td><br></td><td align=right>
82<a href="../api_c/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
83</td></tr></table>
84<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
85</body>
86</html>
87