2
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
3
<!--All rights reserved.-->
4
<!--See the file LICENSE for redistribution information.-->
7
<title>Berkeley DB: DbEnv::set_tx_timestamp</title>
8
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
9
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
12
<a name="2"><!--meow--></a>
13
<table width="100%"><tr valign=top>
15
<h1>DbEnv::set_tx_timestamp</h1>
18
<a href="../api_cxx/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
23
#include <db_cxx.h>
26
DbEnv::set_tx_timestamp(time_t *timestamp);
29
<p>Recover to the time specified by <b>timestamp</b> rather than to the most
30
current possible date.
31
The <b>timestamp</b> argument should be the number of seconds since 0
32
hours, 0 minutes, 0 seconds, January 1, 1970, Coordinated Universal
33
Time; that is, the Epoch.
34
<p>Once a database environment has been upgraded to a new version of Berkeley DB
35
involving a log format change (see <a href="../ref/upgrade/process.html">Upgrading Berkeley DB installations</a>), it is no longer possible to recover
36
to a specific time before that upgrade.
37
<p>The DbEnv::set_tx_timestamp method configures operations performed using the specified
38
<a href="../api_cxx/env_class.html">DbEnv</a> handle, not all operations performed on the underlying
40
<p>The DbEnv::set_tx_timestamp interface may not be called after the <a href="../api_cxx/env_open.html">DbEnv::open</a>
42
<p>The DbEnv::set_tx_timestamp method either returns a non-zero error value or throws an exception that
43
encapsulates a non-zero error value on failure, and returns 0 on success.
45
<p>The DbEnv::set_tx_timestamp method may fail and throw an exception or return a non-zero error for the following conditions:
47
<p><dt>EINVAL<dd>An invalid flag value or parameter was specified.
48
<p>It is not possible to recover to the specified time using the log files
49
currently present in the environment.
51
<p>The DbEnv::set_tx_timestamp method may fail and throw an exception or return a non-zero error for errors specified for other Berkeley DB and C library or system methods.
52
If a catastrophic error has occurred, the DbEnv::set_tx_timestamp method may fail and
53
either return <a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a> or throw a
54
<a href="../api_cxx/runrec_class.html">DbRunRecoveryException</a>,
55
in which case all subsequent Berkeley DB calls will fail in the same way.
57
<a href="../api_cxx/env_class.html">DbEnv</a>, <a href="../api_cxx/txn_class.html">DbTxn</a>
59
<a href="../api_cxx/txn_list.html">Transaction Subsystem and Related Methods</a>
61
<table width="100%"><tr><td><br></td><td align=right>
62
<a href="../api_cxx/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
64
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>