Allow database files to be copied, and then the copy used in the same database environment as the original.

Namespace:  BerkeleyDB
Assembly:  libdb_dotnet52 (in libdb_dotnet52.dll) Version:


public void ResetFileID(
	string file,
	bool encrypted
Visual Basic (Declaration)
Public Sub ResetFileID ( _
	file As String, _
	encrypted As Boolean _
Visual C++
void ResetFileID(
	String^ file, 
	bool encrypted


Type: System..::.String
The name of the physical file in which new file IDs are to be created.
Type: System..::.Boolean
If true, he file contains encrypted databases.


All databases contain an ID string used to identify the database in the database environment cache. If a physical database file is copied, and used in the same environment as another file with the same ID strings, corruption can occur. ResetFileID creates new ID strings for all of the databases in the physical file.

ResetFileID modifies the physical file, in-place. Applications should not reset IDs in files that are currently in use.

See Also