Users may see a .qvw.OldFile during the reload/distribution process, and the associated task may fail
Article Number: 000042890 | Last Modified: 2019/01/28
A user encounters a task failure.
Log files show:
Access to the path '\\[servername]\Path to Source Documents\DashboardName.qvw.oldfile' is denied
Why is there a .qvw.Oldfile in the SourceDocument folder at this point?
Initially, there is the "original" sourcedocument.qvw. During the reload, QlikView Distribution Service (QDS) creates a [GUID number]_SourceDocument.qvw.tmp file that results in a new file containing fresh data residing in the SourceDocument folder. This file is subsequently renamed to the updated SourceDocument.qvw at the end of the Reload process. Additionally, one of the intermediate steps creates a SourceDocument.qvw.Oldfile. This file is a temporary copy of the "original" Sourcedocument.qvw and resides in the SourceDocument Folder as file loss prevention if there is a "file access" failure during the transition of .qvw.tmp to .qvw.
Some behaviors of which to be aware:
If during the reload, the rename of the qvw.tmp file to the SourceDocument.qvw fails, it will retry for 10 seconds. If the timelimit is reached, there is a SourceDocument.qvw.OldFile in the SourceDocuments folder along with the .qvw.tmp file. The task fails and QDS removes the .qvw.tmp file. The .qvw.Oldfile will be all that remains in the SourceDocument folder. Next, during the subsequent reload, one of the first steps of the process is for the QDS to check for the presence of a SourceDourceDocument.qvw.OldFile. If one is found, QDS renames .qvw.Oldfile to the SourceDocument.qvw. Otherwise, if a SourceDocument.qvw is present, QDS removes the qvw.OldFile. If after a reload failure, a SourceDocument.qvw.Oldfile and a SourceDocument.qvw exist, check the task log and most likely the result will be an "access denied" failure on the .qvvw.OldFile. This is probably due to the .qvw.Oldfile being locked by the QDS or a scanning agent. If you are not successful renaming, moving or deleting the .qvw.Oldfile, given some type of "Access Denied" error, the QDS is locking the file. Ensure login to the server using the QlikView service account if trying to rename or remove the file. The service account owns that file and it cannot be removed by any other account in most cases. (You can test this by creating a .qvw.Oldfile using the administrator account and running a reload. The .qvw.Oldfile does not go away. If you login with the service account and create the .qvw.Oldfile and run a reload, the .qvw.Oldfile will be removed.) If you are able to remove, rename or delete the file, then it may have been a temporary lock by a scanning agent. Try rerunning the task. It should be successful once the .qvw.Oldfile is removed.
The .qvw.Oldfile could present itself if a reload is in process, and the qvb process in Task Manager is "killed". The QDS may not be able to properly "unlock" the .qvw.Oldfile if present when the qvb process is killed.
When everything is working as it should, the .qvw.Oldfile should be present for just a few moments when the .qvw.tmp is being created. Once the .qvw.tmp is fully written and verified, the name change to the SourceDocument.qvw is done, and the .qvw.Oldfile is removed.
The .qvw.OldFile is one of the files that is created during the reload/distribution process of a Publisher task. It came to be as a result of a problem seen in QlikView 11.2 versions where "access denied" errors caused Source QVWs (Publisher) and User Documents (Reload Engine) to be deleted.
Most common root causes of the Access to the path .qvw.oldfile is denied is either:
Verify that the .oldfile is not locked and restart the task.Another possible workaround when presented with a .qvw.Oldfile in the Source Documents folder which cannot be renamed, removed or deleted is:
- The QlikView QVB.exe not having released the lock on the old file
- Another process locking the file
- A scanning agent (Virus Scan) locking the file
1. Create a reload task to a new folder location. 2. Rename the “Reduced Document” in the QlikView Management Console (QMC), because QDS will not be looking for a locked .qvw.Oldfile with that name.3. Restart the QDS service. (This will free the lock on the file, but is not an optimal solution when working in a Production environment during normal business hours.)