Configure automatic handling of network file sharing violations
23 June 2005 by Snakefoot | Comment » | Trackback OffA sharing violation happens when one program requests exclusive access to a file (ex. to write to the file), while another program is already having the file open (ex. to read the file). When a sharing violation happens on a local file, then the request for write-access will fail at once.
When a sharing violation happens on a network file, then the Server service on the remote machine will detect the sharing violation, but instead of failing right away, then it retries to open the file with certain intervals.
This retry mechanism is quite nice when using programs in a network environment, which haven't been made to handle sharing violation, as it will lower the "visible" sharing violations. If the programs trying to access the same file is already capable of handling the sharing violation, with their own retry mechanism, then this change in behavior with network files might interfere, and lower performance.
Credits www.jsifaq.com
When a sharing violation happens on a network file, then the Server service on the remote machine will detect the sharing violation, but instead of failing right away, then it retries to open the file with certain intervals.
This retry mechanism is quite nice when using programs in a network environment, which haven't been made to handle sharing violation, as it will lower the "visible" sharing violations. If the programs trying to access the same file is already capable of handling the sharing violation, with their own retry mechanism, then this change in behavior with network files might interfere, and lower performance.
Note it is strange that Microsoft have implemented this polling strategy, incase several programs are trying to request the same file, then one or more programs might experience that they never gets access because between each delay another program "steals" the access.[HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Services \LanmanServer \Parameters]
SharingViolationDelay = 200 (Default = 200 ms)
SharingViolationRetries = 5 (Default = 5)
More Info MS KB Q150384
More Info MS KB Q889588
Credits www.jsifaq.com
Tags:
Category:
Updated: 23 September 2007
Comment by cumulus - 10 April 2007 @ 11:42 Reply
My need is to have one macro writing periodically to a file and have another macro on another PC copy that file, neither macro to interfere/crash the other. This article seemed to offer a solution. However, SharingViolationDelay/Retries do not exist either under lanmanserver or workstation in the registry in my XP Pro, Office 2000 environment. I use Excel 2000 because it is multiples faster than Excel 2003 and especially many multiples faster than Excel 2007.
Help would be much appreciated.