ResetFileID Method

BerkeleyDB

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

Namespace:  BerkeleyDB
Assembly:  libdb_dotnet48 (in libdb_dotnet48.dll) Version: 4.8.24.0

Syntax

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

Parameters

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

Remarks

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