Library Version 12.1.6.2

env dbrename
Prev | Chapter 1. Berkeley DB Tcl APIs | Next

## env dbrename

    env dbrename
    	[-auto_commit]
    	[-txn txnid]
    	[--]
    	file
    	newname

Rename the Berkeley DB database file to newname.

The options are as follows:

- -auto_commit

  Enclose the call within an implicit transaction (you do not need to provide a transaction handle as a transaction is internally created and commited for you). If the call succeeds, changes made by the operation will be recoverable. If the call fails, the operation will have made no changes.

- -txn txnid

  If the operation is part of an application-specified transaction, the txnid parameter is a transaction handle returned from env txn. If no transaction handle is specified, but the -auto_commit flag is specified, the operation will be implicitly transaction protected.

The env dbrename command returns 0 on success, and in the case of error, a Tcl error is thrown.

Prev | Up | Next
env dbremove | Home | berkdb env