### DB_TXN->set_name |

`

###

    #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
  The name parameter is the string to associate with the transaction.

### 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
  The DB_TXN->get_name method returns a reference to the string associated with the transaction in namep.

### Class

DB_ENV, DB_TXN

### See Also

Transaction Subsystem and Related Methods`

Copyright (c) 1996-2006 Oracle Corporation - All rights reserved.