Skip to main content

Shared Files - Verification and Cleaning

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Andre_Sostizzo
Digital Support
Digital Support

Shared Files - Verification and Cleaning

Last Update:

Aug 24, 2020 4:10:57 AM

Updated By:

Sonja_Bauernfeind

Created date:

Oct 18, 2013 11:43:12 AM

Shared user objects or bookmarks may stop working due to .shared file corruption. It's suggested to verify and clean Shared Files on occasion.

As of QlikView 11.2 SR4, QlikView includes an inbuilt functionality to run corruption reports (verification) and cleaning (purge) of any Shared file. With 12.20 (November 2017), the cleaning and verification of Tshared files was added. 12.20 also introduces the ability to convert between .shared and .tshared. 

!  See the Qlik Online Help > Deploying QlikView > Planning QlikView Deployments > Deployment > Cleaning and converting the shared files for more details and specific commands. Select the respective version of QlikView for commands specific to the installed version.

Best Practices

Because the new tool runs from a command prompt that instructs qvs.exe to perform the desired actions, it is advised to copy the qvs.exe to a temporary location where it will be utilized for reporting and cleaning. This will also ensure your production qvs.exe remains independent of these processes.
Similar to above, it is also recommended to run reports and cleaning on copies of your production Shared files. This will ensure that you are not affecting anything currently in a production state.
 

Obtaining a Shared file corruption report (verification)

  1. Copy and paste the (default) C:\Program Files\QlikView\Server\qvs.exe file to a staging area away from production.
  2. Open Windows' Command Prompt (cmd.exe)
  3. Run the following: <staging area directory path>\qvs.exe –x "<shared file location and full file name>" –v warning: verification may not be available in your version, see known defects below
    a.      This will generate a report, if successful, in the directory the qvs.exe resides in. The report will be named similar to “FileName.qvw.shared_clean.log”. Or the log file will be created under the default log location. The file name will be "CleaningTool_<Servername>.log". 
    b.      The report can be opened in a text editor and reviewed for corruption verification.
              i.      Invalid entries will be found and reported within this file. If any are found, then the recommendation is to clean the file.


  Cleaning the Shared file (purge)

  1. Copy the production shared file over to a staging area, preferably after hours or when usage in the environment is at a minimum.
  2. Open Windows' Command Prompt (cmd.exe)
  3. Run the following: <staging area directory path>\qvs.exe –x “<shared file location and full file name>” –p
    a.       A new qvs.exe process will spawn, cleaning the specified Shared file.
    b.      The “clean” file will be written to the same directory as the original Shared file, named similar to “FileName.qvw.shared_clean”
                        i.    Verify the file again by running the command line listed in the above section (-v)
                        ii.   Stop the QlikView Server (QVS) service.
                        iii.  Replace the existing, corrupted Shared file(s) with the cleaned one(s)
                        iv.  Then restart QVS.

 

Example of a Verification:

C:\Temp\SharedFileToolTemp>qvs.exe -x "C:\ProgramData\QlikTech\Documents\Golf Quest.qvw.shared" –v

 

Example of a Purge:

C:\Temp\SharedFileToolTemp>qvs.exe -x "C:\ProgramData\QlikTech\Documents\Golf Quest.qvw.shared" –p

 

Example of a Purge + removing bookmarks over a set size (measured in bytes):

C:\Temp\SharedFileToolTemp>qvs.exe -x "C:\ProgramData\QlikTech\Documents\Golf Quest.qvw.shared" –p -rBM 1000000

 

With Qlikview 12.10: Example of a Purge + change owner of an object:

C:\Temp\SharedFileToolTemp>qvs.exe -x "C:\ProgramData\QlikTech\Documents\Golf Quest.qvw.shared" –p -ro domain\olduser domain\newuserxample of clearing out bookmarks based on last use:

-so will set owner  -ro replace

See Cleaning Bookmarks in the QlikView shared file for details.
 

Other Options

-l: Allows you to choose the path where the log file is stored. The default location is "C:\ProgramData\QlikTech\QlikViewServer"
-o: Allows you to choose the path where the cleaned shared file is stored. The default location is the same folder that the original shared file is located.
 

Known defects?

The verification (-v) parameter won't work with a qvs.exe from 11.20 SR5, 11.20 SR6 and 11.20 SR7. This issue has been reported to R&D with product defect ID 68257. As a workaround it will work to use a qvs.exe from 11.20 SR4.

There was also an issue in 12.00 initial release and possibly other service releases in 12.00 track.

Additional Links:

Support Article: Shared Files - General Information
Support Article: Shared Files - Detecting Corruption in the Environment
Support Article: How to convert between different QlikView shared file formats

 

Step-by-step Instructions


1. Make backups of your shared files before proceeding. 

2. Locate your copy of QVS.exe. By default that will be in C:\Program Files\QlikView\Server and
   make a copy of it. Place the copy in a different folder, for example C:\Temp.

3. Determine which shared file you wish to repair (purge).

4. Open a command prompt (run as Administrator).

5. To repair the shared file, enter the appropriate command line as below. For example:
 

C:\> “C:\Temp\QVS.exe” –x “C:\ProgramData\QlikTech\Documents\MOVIES DATABASE.QVW.Shared” –p


6. The purge process will create a new shared file, with corrupt objects removed or corrected. Note
   the resulting file may be larger than the source file. The new file will be placed in the same
   folder as the source shared file, but will be called MOVIES DATABASE.QVW.qvw.Shared_clean. The
   original source shared file will be remain in place.

7. Finally, replace the old corrupt shared file with the new file. Do this when the file is not in use
   (i.e. there are no users accessing the application on the server). Rename the old shared file,
   and copy the new shared file. The correct name should be MOVIES DATABASE.QVW.qvw.Shared.
 

Warnings and Tips

  • Any time you run the cleaning tool against a SharedFile, new lines will be added to the CleaningTool_MACHINENAME.log file.
  • Make backups of your shared files before running the cleaning tool.
  • In production environments where the existing QVS is very busy, copy the QVS.exe file to a temporary folder, and execute the command line against the second QVS.exe file.
  • Make sure, before running the cleaning tool, that you have permissions for creating files within both folders. The one where the report file is going to be saved and the other one where the clean version of the SharedFile is going to be saved.
  • The user must run the QVS.exe process with administrator privileges. In case you are experiencing issues when trying to running the tool, please, try going into the properties dialog of the QVS.exe file (right-click on it), and CHECK-ON the box “Run this program as an administrator”, in Compatibility tab.
  • If you have any questions please contact Support, and we will help you out as soon as possible.
  • Reboot the machine if attempting to run things on a new machine that has not had QlikView Server previously installed.
  • Ensure the account being used to Run the Command Line is a member of the local QlikView Adminstrators security group.
Labels (1)
Contributors
Version history
Last update:
‎2020-08-24 04:10 AM
Updated by: