Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dec 6, 2022 2:54:45 AM
Mar 15, 2013 8:40:05 AM
There are tasks configured that both read from as well as write to the same QVD file at approximately the same time. Intermittently, one of the tasks may result in a failure due to the file being opened exclusively by the write task or a read task already having the file open and the write not being able to get an exclusive open.
Environment:
This has been reviewed by R&D and the resultant behavior is to be expected. When the writing task reaches the point of execution of the Store statement, it will attempt to open the file exclusively thus denying other tasks both read and write access to the file.
Scenario 1: Read/Read - Task 1 (Read) opens the QVD file then Task 2 (Read) opens the file while Task 1 still has it open. All tasks run fine.
Scenario 2: Write/Read - Task 1 (Write) opens the QVD file then Task 2 (Read) also opens the file while Task 1 still has it open. Task 2 will fail since Task 1 has the file opened exclusively and Task 1 will run fine.
Scenario 3: Read/Write - Task 1 (Read) opens the QVD file then Task 2 (Write) also opens the file while Task 1 still has it open. Task 2 will fail since it will not be allowed to open the file exclusively while there are other tasks reading from it. Task 1 completes fine, Task 2 results in a failure.
Make sure that the Read and Write tasks are not scheduled at the same time.
If there's a risk of that occurring, it might be a good idea to run an external task that makes a copy of the QVD, before both tasks start, and use the copy as the source for the "read" task.
Hi, how can we create a copy for read only in qlik sense
Hello @s_swetha Can you clarify what you mean by copy for read only?
What are you wanting to create a copy of?
This article describes how reloads can be affected if they access the same documents.
All the best,
Sonja
Hi @Sonja_Bauernfeind ,
I'm also facing same issue as the two tasks are using same QVD file, I'm referring to this sentence "it might be a good idea to run an external task that makes a copy of the QVD, before both tasks start, and use the copy as the source for the read task", how can we create a copy can you please explain.
Hello @s_swetha
This is a possible workaround, though one which requires customisation on your end.
For information on external tasks in QlikView, see Creating and editing external program tasks In this case, you would use a third-party script of your choice which copies the QVD and you would point the next QlikView task to this copy.
Generally, though we recommend scheduling your tasks so as not to need to introduce additional complexity.
All the best,
Sonja