You are here: Configuration > File Configuration > Lock Database File

Lock Database File

You can disable the database lock. This is useful for two some scenarious. For example accessing a pure-readonly database at the same time. Or for increasing the performance on some small embedded devices.

However this risks the database integrity. Never access the database file at the same time with multiple object containers!

IEmbeddedConfiguration configuration = Db4oEmbedded.NewConfiguration();
configuration.File.LockDatabaseFile = false;
FileConfiguration.cs: Disable the database file lock
Dim configuration As IEmbeddedConfiguration = Db4oEmbedded.NewConfiguration()
configuration.File.LockDatabaseFile = False
FileConfiguration.vb: Disable the database file lock