db close

db close

The db close command flushes any cached database information to disk, closes any open cursors, frees any allocated resources, and closes any underlying files. Because key/data pairs are cached in memory, failing to sync the file with the db close or db sync command may result in inconsistent or lost information.

The options are as follows:

After db close has been called, regardless of its return, the DB handle may not be accessed again.

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