Maintaining Transactional Integrity with OPLOCKS

Article translations Article translations
Article ID: 224992 - View products that this article applies to.
This article was previously published under Q224992
Expand all | Collapse all

SYMPTOMS

Under extreme conditions, some multiuser database applications that use a common data store over a network connection on a file server may experience transactional integrity issues or corruption of the database files and/or indexes stored on the server. This typically applies to some so-called "ISAM style", or "record oriented" multiuser database applications, not to a client/server relational system like SQL Server.

CAUSE

If a multiuser or single user database application accesses a common data store on a Windows NT file server using opportunistic locks (or OPLOCKS), it is possible for a given user to cache partial transactions on the client systems hard drive. This is a performance enhancement to the Windows client redirector to reduce network file I/O between the client and server. The data being cached on the client redirector is later written back to the server. However, in some cases, a client system may stop responding (hang), do a hard reboot, lose its network connection to the server, or experience any number of other technical difficulties. In such cases, the content of the local cache that has not yet been written to the server can be lost. As a result, the transaction integrity of the database structures on the server is compromised and the data on the file server can become corrupted.

RESOLUTION

To work around this problem, developers writing database applications that access a network data store should flush file buffers at any time that represents delineation of a transaction; for example, after a bulk operation, or prior to closing a file handle, or any time a transaction log is written to. This can be done by calling the Win32 FlushFileBuffers API Call.

Properties

Article ID: 224992 - Last Review: November 1, 2006 - Revision: 1.1
APPLIES TO
  • Microsoft Windows NT Server 4.0 Standard Edition
  • Microsoft Windows NT Server 4.0 Enterprise Edition
Keywords: 
kbprb KB224992

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com