[This is preliminary documentation and subject to change.]
The NTMSDATA.BAK (replica) file contains a interlocked replica of the database's data file. The purpose of this file is not to create a backup, but to provide a consistent replica of the database file while updates are in progress. An update to the main data file occurs only during a transaction commit operation, at which time the data file becomes inconsistent. The replica is guaranteed to remain consistent across the update and until the main data file is consistent again, at which point the replica is updated slowly. Although the database uses the slow update model for the backup, the database employs an interlock that prevents the main data file from beginning another update until the replica is completely up to date. This provides the benefit of improved performance for the thread performing the commit operation while ensuring integrity. Although this means that any thread performing back-to-back commit operations incurs a performance penalty for the replica, in practice very few RSM operations use back-to-back transaction commits.