Moving QlikView Server log files

By Barry Harmsen

Beam me up!This is a sneak-peek at one of the topics covered in the Server Admin best practices session at the Masters Summit for QlikView:

When doing QlikView Server deployments for clients, I often come across policies stating that the C: drive, the default installation drive for QlikView, may only be used for the operating system. Program files, data and logs all need to be placed on other, designated drives. The rationale for this policy is that data, and especially log files that aren’t purged, can fill up the boot drive and disrupt the system.

Specifying alternative locations for program files is simply a matter of specifying another installation path during setup, and the location of data and QVWs can be easily configured in the QMC. Moving log files is a little more complex however, so today I have for you a tutorial explaining two options for moving your log files and other configuration artifacts.

The options

The two options for moving log files are:

  • Modifying the configuration files
  • Creating a symlink

Read on to see how to implement each solution, and when to use which solution.

Modify the configuration files

You can change the location of log files by modifying the .exe.config files, which hold configuration settings for the various server components. The key to change (or add, if it’s missing) is ApplicationDataFolder, as shown in the following image.

Editing the configuration file

The default locations for the .exe.config files are:

  • C:\Program Files\QlikView\Directory Service Connector\QVDirectoryServiceConnector.exe.config
  • C:\Program Files\QlikView\Distribution Service\QVDistributionService.exe.config
  • C:\Program Files\QlikView\Management Service\QVManagementService.exe.config
  • C:\Program Files\QlikView\Server\Web Server\QVWebServer.exe.config

Do not forget to stop the services while you are modifying the files, create a backup, and copy the contents of the log/data folder to the new location.

You’ll notice that there is no .exe.config file for the QlikView Server (it’s not a .Net application). You can change the location of the QVS logs in the QMC, under System | Setup | QVS | Logging | Log Folder, as shown in the following image:

Modify QVS log location in QMC

 

Unfortunately, this solution isn’t perfect, even after making all these changes you are still left with some artifacts in the C:\ProgramData\QlikTech directory. I’m writing this part of the post from memory, so I am not quite sure, but believe the artifacts had to do with the embedded webserver used by the QlikView Management Service. Feel free to correct me.

Create a symlink

If the previous option seems like a lot of work, you may appreciate the second option; creating a symlink. A symlink, or symbolic link, is a reference from one location to another. Just like a shortcut. You may have data stored in one folder and reference it from another folder using a symlink. Reading or writing files in the ‘symlinked’ folder behaves exactly the same as performing those operations on the folder the symlink is pointing to.

Or, to make it more concrete, say that you want to move your log files and program data from the standard location of C:\ProgramData\QlikTech to D:\QlikView\Config. The steps to achieve this using a symlink is:

  1. Stop all QlikView services
  2. Create the destination directory D:\QlikView\Config
  3. Open the command prompt with Administrator privileges and navigate to C:\ProgramData:
      • c: (just in case)
      • cd\programdata
  4. Copy all files in the QlikTech folder to the new destination using Xcopy: Xcopy QlikTech D:\QlikView\Config\ /E /H /K /O /X
  5. Remove the original QlikTech directory: rmdir QlikTech /s /q
  6. Create the symlink to the new directory: mklink /D QlikTech D:\QlikView\Config
  7. Restart all services

Now when you do a directory listing of the C:\ProgramData folder, you’ll notice the QlikTech symlink is pointing to the D:\QlikView\Config folder, as shown in the following image.

Directory listing with symlink

The advantage of this solution is that the files were moved from the C: drive without requiring any configuration changes in QlikView. I like it!

Bonus tip: for those developers working on extensions, symlinks also come in handy to point the extension folders of QV Server and QV Desktop to a single folder. This ensures that the extensions you’re working on are immediately available for testing in both the Desktop and Server environments.

When to use what?

By default, I use the symlink option as it is much easier to implement. However, sometimes using a symlink is not possible, for example because IT policies forbid it (yes, I have had that happen). In that case, I modify the config files.

Voiding the warranty

Do be aware that both these options for moving log files are unsupported by QlikTech. Should you have any server issues then QT Support may require that you first undo the changes to the log file location. This is another reason I prefer the symlink option; it can be undone within 5 minutes. I’ve never actually ran into any support issues where I’ve had to undo the changes to the log file location however.

So what are your experiences? Is this a requirement you run into often? Do you want to read more about server admin? Let me know what you think by leaving a comment.

About The Author

Barry Harmsen

Hi there, I'm Barry and I'm a Business Intelligence Consultant at Bitmetric and based in the Netherlands. Originally from a background of 'traditional' Data Warehousing, Business Intelligence and Performance Management, for the past 10 years I have been specializing in Qlik and a more user-centric form of BI. I have done numerous QlikView and Qlik Sense implementations in many different roles and industries. In 2012 I co-authored the book QlikView 11 for Developers. You can follow me on Twitter at @meneerharmsen.

3 Comments

  • 1
    May 15, 2014 - 21:51 | Permalink

    Hi Barry,

    Good info. Just wondering if you have ever separated the Audit and Session logs by the qvw file that is opened? We have applications that are hosted on the same server and the customer is interested in seeing their audit log. I don’t want them to see other customers activity, though. Any thoughts??

  • 2
    sanjeev
    May 18, 2016 - 14:11 | Permalink

    Hi barry,

    Do you know where the below Doc Admin details are stored so that i can take a backup.

    QMC-> setup->qlikview server-> folder access ->Doc adminstrators

  • 3
    Robin Hausdörfer
    June 3, 2018 - 11:48 | Permalink

    Hi Barry,

    I just like to add a little comment. You’re idea is great (basically). And you also made clear that it is not officially supported by QlikTech.

    I tried updating QlikView 11.2 to 12.1 and all settings were lost, when using symlinks. It took me quiet a long time until I found the cause for the problem.

    So I suggest removing the symlinks before updating.

    Regards

  • Leave a Reply

    Your email address will not be published. Required fields are marked *

    Read previous post:
    Masters Summit for QlikView: European Edition

    After the success of the Las Vegas edition last April, I'm excited to be once again presenting alongside Rob Wunderlich,...

    Close