Sur cette page
The QlikView shared file cleaning tool is a command line tool that allows system administrators to verify (analyze) and purge (repair) shared files. This tool can also be used to convert between different shared file formats, see Converting the shared files. You can invoke it 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 uses the suffix _clean after the format (.Shared or .Tshared), and the original shared file is not overwritten. You can then decide to replace the original shared file with the clean version.
When you create shared files, you can save them in original or transactional format. The original format is recognizable by the .Shared ending, while the transactional shared file format ends with .TShared. A shared file using the transactional .TShared format is more reliable in case of failures, such as network issues, power outages, or insufficient storage space on disk. We recommend to use the .TShared format for files larger than 2 GB, because this format can handle file size up to 16 EB (exabyte).
You can use the two different formats, original and transactional, simultaneously for different applications on the same server. However, only one format (either .Shared or .TShared) should be used in a given application. You can decide which format to use when creating a new shared file by configuring the Settings.ini file. For QlikView Server, the Settings.ini file is located in C:\ProgramData\QlikTech\QlikViewServer.
Set the file format:
With this setting, the .Shared format is used when creating new shared files.
With this setting, the .TShared format is used when creating new shared files.
You can also convert the shared files using the QlikView shared files cleaning command as shown in the tab below, and in the example n.4 in the Examples section at the bottom of the page.
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.
[Optional] The -f (specify output format) parameter allows to use the cleaning tool to convert between shared file formats.
The format can be specified as same, orig or tx (e.g. -f tx).
When the format (-f parameter) is not specified, the default option is same.
This field accepts a path to a file if more than one user needs to be removed
To obtain a list of users that have accessed the QlikView servers, the Governance Dashboard application can be used. It is available for free in our download site (see associated documentation here (uniquement en anglais)).
The list of users can be easily extracted by exporting to 'csv' format the ListBox 'Athenticated User' in the Operations/Session sub-tab of the Governance Dashboard. This list can then be edited (keep only the users to be removed from the shared file) and passed on to the Cleaning Tool as an input.
|-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.
Using the shared file cleaning tool
The share file cleaning tool is run by using the Windows Command Prompt in Administrator mode. Do the following:
The cleaning process completely regenerates the shared file. Issues regarding fragmentation of the file will disappear and file size and access time may be reduced.
- Create a copy of the QVS executable. By default the QVS.exe is installed in C:\Program Files\QlikView\Server .
- Navigate to the folder where the copy of the QVS.exe is located and run the cleaning tool in verify mode. For example:
"C:\<Temporary_path>\QVS.exe –x “C:\ProgramData\QlikTech\Documents\FinanceAnalysis.qvw.Shared” –v
- Locate the CleaningTool_MACHINENAME.log verify 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 corrupted 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 file identified by the suffix _clean (for example: MYFILENAME.QVW.TShared_clean) 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 no QlikView Server services are running.
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:
Example 4: Changing output format
Running the following command in the windows command prompt allows to convert a file in the original shared file format to the new format:
Example 5: Removing non-shared entries from a specific user
Running the following command in the windows command prompt removes all non-shared entries associated to a specified user UserX:
Example 6: Removing all entries from a set of users specified in a text file
Running the following command in the windows command prompt removes all entries (including the ones that are shared) associated to a list of specified users in the Users.txt column text file.:
Example of the Users.txt file:
Example 7: Removing all entries from a set of users specified in a text file for a whole folder
There is also the possibility of processing a whole set of shared files contained within a folder with a common list of users to be removed from them.
Running the following command in the windows command prompt removes all (including the ones that are shared) entries associated to a list of specified users in the Users.txt column text file. For all shared files within the folder 'Documents':
Example of the Users.txt file: