The QlikView shared file cleaning tool is command line tool that allows system administrators to verify (analyze) and purge (repair) shared files. You can invoke this tool by running the QlikView Server executable (QVS.exe) with special parameters.
There are two modes available with the cleaning tool, each is specified by a different command-line parameter.
Use the -v parameter to analyze the shared file specified in the command-line. During analysis, the cleaning tool detects if there is one or more invalid or corrupted object entries. The QVS then logs as much information as possible about the invalid entries.
Use the -p parameter to verify the shared file and then create a new shared file with the corrupt entries removed. This clean version is placed into the same folder as the original. The new file is called MYFILE.QVW.Shared_clean and the original shared file is not overwritten. You can then make a decision to replace the original shared file with the clean version.
Setting and changing ownership of shared file content
You can change the owner of server objects with QMC, but for some object types (“DocumentContent”, “InputFieldValues” and “ObjectContent”) ownership cannot be changed this way. In this case you need to use the cleaning tool to change ownership, using the -so (set ownership) or -ro (replace ownership) parameters. These parameters should be used in purge mode.
Cleaning tool command format
The cleaning tool command format is as follows:
The following table describes each command parameter.
|QVS_executable_path||The full path to the system folder containing the QVS executable (QVS.exe).|
|-x||The -x parameter tells the QVS to only run the cleaning tool.|
|Shared_file_path||The path to the shared files to clean.
It accepts a path to a directory or a path to a file.
|-l Log_folder_path||[Optional] If you want to change the location of the generated log file, use -l and provide a log folder path.|
|-rBM BM_size||[Optional] The -rBM parameter is used to remove large bookmarks from the shared file. All bookmarks larger than <BM_size> (in bytes) will be removed.|
[Optional] The -o parameter is used to change the path to where shared files are saved.
Example 1: Analyzing a shared file
Running the following command in the windows command prompt analyzes the shared file and creates a log file in the C:\logs folder:
Example 2: Setting file ownership
Running the following command in the windows command prompt sets ownership of the server objects in the shared file to user UserX:
Example 3: Replacing file ownership
Running the following command in the windows command prompt replaces ownership of the server objects in the shared file from UserX to UserY:
Using the shared file cleaning tool
The share file cleaning tool can be initiated by using the Windows Command Prompt in Administrator mode. Do the following:
- Navigate to the QVS executable. By default it is installed in C:\Program Files\QlikView\Server .
- Run the cleaning tool in verify mode. for example QVS.exe –x “C:\ProgramData\QlikTech\Documents\FinanceAnalysis.qvw.Shared” –v
- Locate the CleaningTool_MACHINENAME.logverify file log. If not specified in your command, the log is stored by default in C:\ProgramData\QlikTech\QlikViewServer.
The log lists each type of shared file object if there is corruption. If the corrupt entry can be identified, it will list the object ID.
- If there are corrupt entries, run the cleaning tool again in purge mode.
The purge process will create a new shared file with the corrupt objects removed or corrected. The new MYFILENAME.QVW.Shared_clean file is placed in the same folder as the source shared file.
- Replace the old corrupt shared file with the new file. This must be done when there are no users accessing the application on the server.