DB_TXN->set_name API Ref

#include <db.h>

int DB_TXN->set_name(DB_TXN *txn, const char *name);

int DB_TXN->get_name(DB_TXN *txn, const char **namep);


Description: DB_TXN->set_name

The DB_TXN->set_name method associates the specified string with the transaction. The string is returned by DB_ENV->txn_stat and displayed by DB_ENV->txn_stat_print.

If the database environment has been configured for logging and the Berkeley DB library was configured with --enable-diagnostic, a debugging log record is written including the transaction ID and the name.

The DB_TXN->set_name method may be called at any time during the life of the application.

The DB_TXN->set_name method returns a non-zero error value on failure and 0 on success.

Parameters
name

Description: DB_TXN->get_name

The DB_TXN->get_name method returns the string associated with the transaction.

The DB_TXN->get_name method may be called at any time during the life of the application.

The DB_TXN->get_name method returns a non-zero error value on failure and 0 on success.

Parameters
namep


Class DB_ENV, DB_TXN
See Also Transaction Subsystem and Related Methods

APIRef

Copyright (c) 1996,2008 Oracle. All rights reserved.