Problem Note 43296: Locking errors can occur for data sets as a result of folder indexing for searches in Microsoft Windows operating environments
Windows Vista and later Windows environments have a folder indexing feature that can improve the performance of the Windows search facility. However, this indexing feature can cause a problem, for the following reason. The normal process for creating or re-creating a SAS data set involves the following general steps:
- writing a temporary data set
- closing the file
- renaming the temporary file and deleting any existing permanent files
When folder indexing is turned on, the indexing routines start immediately after the file is closed but before the renaming operation. The indexing routines open the file, which can prevent the SAS renaming function from occurring, which the SAS
® System interprets as a locking failure. When this failure occurs, the following error message is generated:
ERROR: A lock is not available for WORK.FOOBAR.DATA.
This same problem can occur when you have Windows folder compression or encryption turned on, or when a virus scanner scans the data set during the same window of time. To prevent the locking issue for SAS data sets that occurs as a result of folder indexing, perform the following steps:
- Open Indexing and Search Options by selecting Start ► Control Panel ► System and Maintenance ► Indexing Options.
- Click Modify.
- To prevent the indexing of a folder, clear that folder's check box in the Change selected locations list. Then click OK.
You can determine the location of the folder for your SAS library by submitting the following LIBNAME statements:
libname work list;
libname libref list;
However, be aware that the last-level folder names that are shown for your WORK libraries are temporary, so you need to remove indexes on the previous level.
It is also possible that the SAS FILELOCKWAIT option can help with this problem. However, to use this option, you might need to install the hot fix that is available in SAS Note 42240, "The LIBNAME option FILELOCKWAIT might not check for a lock in all cases."
Operating System and Release Information
SAS System | Base SAS | Microsoft Windows Server 2008 | | |
Microsoft Windows Server 2008 for x64 | | |
Windows 7 Enterprise 32 bit | | |
Windows 7 Enterprise x64 | | |
Windows 7 Home Premium 32 bit | | |
Windows 7 Home Premium x64 | | |
Windows 7 Professional 32 bit | | |
Windows 7 Professional x64 | | |
Windows 7 Ultimate 32 bit | | |
Windows 7 Ultimate x64 | | |
Windows Vista | | |
Windows Vista for x64 | | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2011-05-27 12:58:48 |
Date Created: | 2011-05-18 09:53:13 |