Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
brianlucci
Contributor III
Contributor III

How to turn on logging when running qv.exe from commad line?`

Hello,

We are upgrading from Qlikview 8.5 to 10 and are in the testing phase.  In our current 8.5 instance we run our scripts every night by calling qv.exe -r <script name> which qv.exe is the Qlikview Developer executable.  I'm new to Qlikview so I really don't know what the -r does since I didn't set this up originally.  Anyway, we are trying to do the same process under Qlikview 10 but every night one of the jobs in the steam gets hung up and we can see it out in the task manager but it's getting no CPU.  Usually we have had this happen when the Qlikview Developer has a pop up message it's waitng for a responce from but since we are running this from a command line script we aren't able to see the message at all.  Is there a documented list of parameters that will allow us to see messages written to a log file or something that will help point us in the right direction?  The issue happens randomly to one of the jobs in the job stream each night so it doesn't appear to be an issue with one of the specific scripts.

Thank you,

Brian

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi Brian,

To create logfiles to see what happens when you reload, open the document, go to the Settings menu, Document Properties, General tab and check Generate Logfile and Timestamp in Logfile Name. Then save and close.

qv.exe /r File.qvw

is used to reload a file in command line, usually by means of a Windows Scheduled task. It does the same as if you open the file and click on reload, save and close. Make sure the file uses "/r" instead of "-r".

Check the logfile that will be created in the same folder where the QVW file is to see where the script has stopped.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

View solution in original post

3 Replies
Miguel_Angel_Baeyens

Hi Brian,

To create logfiles to see what happens when you reload, open the document, go to the Settings menu, Document Properties, General tab and check Generate Logfile and Timestamp in Logfile Name. Then save and close.

qv.exe /r File.qvw

is used to reload a file in command line, usually by means of a Windows Scheduled task. It does the same as if you open the file and click on reload, save and close. Make sure the file uses "/r" instead of "-r".

Check the logfile that will be created in the same folder where the QVW file is to see where the script has stopped.

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

brianlucci
Contributor III
Contributor III
Author

Thank you Miguel.  I changed the -r to a /r and so far today we have not had any issues with the scripts getting hung up during the reload process.  Where can I find a listing of available command line options to use with the qv.exe program from a command line?

Miguel_Angel_Baeyens

Hi Brian,

They are documented in the Reference Manual that is under your Program Files\QlikView\Documentation, Book I, Part III, Section 6.1 pasted below.

6.1 Command Line Syntax

The QlikView command line invocation can be described by the following syntax

(for a description of the syntax notation used, see page 535 in Book III):

[ path ] Qv.exe [ { switch } documentfile ]

The path is the path to the file, either absolute, or relative to the current directory.

documentfile::= [ path ] documentfilename

documentfilename is the name of your document file.

switch is used to mark different options:

/r

Reload switch. The document will be opened and the script

reloaded. Thereafter the document will be saved, and QlikView will

close itself.

/rp

The same as above, but with a partial reload.

/l

Load new data. The document will be opened and the script

reloaded. The document will not be saved and QlikView will remain

open.

/lp

The same as above, but with a partial reload.

/v

If this switch is immediately followed by a variable name and an

assignment, the variable will obtain the assigned value before the

script execution starts.

/nodata

Opens the document without variables, table and field data. This

feature is also available for previously opened documents on the

Start Page, see page 43.

42

/NoSecurity

Overrides QlikView security measures against hostile macros and

scripts embedded in QlikView documents. No warning dialogs

prompting the user to accept potentially harmful code will be

shown. Use this switch with caution and only with well-known documents.

Example:

qv.exe /r /vMyvar=123 abc.qvw

Note In order to avoid error messages to appear when executing scripts in

batch mode, always set the script variable errormode to 0 in the

script (see page 358)

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica