Skip to main content
Kofax

Identifying the queries running behind KAMV reports

307819

Question / Problem: 

How do I identify the queries running behind KAMV reports?

Answer / Solution: 

Enabling logging for the Insight WCF Service can provide additional information relating to the underlying activities.

Follow these steps to enable logging (which are also covered in the Administrator's Guide) and obtain the query data:

1) Enable logging
    a) On the Insight Server, navigate to <Insight_installation_directory>\WcfDataService
    b) Back up the web.config file
    c) Open web.config for editing
        i) Locate the line containing:Insight.DataProcessing.Readers.IsLoggingEnabled
        ii) Set the value to TRUE to enable logging (or to FALSE to disable logging)

2) Backup the current DataProcessing.log
3) Login into KAMV Viewer and for the report for which the query is required, right click on the viewer and select “Logging”
4) Right click on the viewer and select “Reset” or “Refresh”
5) The Insight log file DataProcessing.log will contain the query

 

Query data examples:

Status > In Capture count:

2019-05-15 02:26:33,229 [7] INFO  - /* Query [Data Source: User Id=kamv_data;Password=********; Data Source=myserver.mydb; Database name: Oracle Provider name: odp]: */
SELECT NVL(COUNT("t0"."AnalyticsInvoiceId"),0) "NVL0"
FROM "CurrentInvoices" "t0"
WHERE "t0"."Organization" IN (N'Vision Operations', N'Vision Services') AND "t0"."__IsValidValue" <> 0 AND "t0"."Organization" IN (N'Vision Operations', N'Vision Services') AND (CASE WHEN "t0"."DocumentGuid" IS NOT NULL AND "t0"."IsFinished" = 0 THEN 1 ELSE 0 END) = 1
2019-05-15 02:26:33,244 [7] INFO  - /* Execution time: 00:00:00.0172921 */

 

Status > In MV count:

2019-05-15 02:29:50,510 [7] INFO  - /* Query [Data Source: User Id=kamv_data;Password=********; Data Source=myserver.mydb; Database name: Oracle Provider name: odp]: */
SELECT NVL(COUNT("t0"."AnalyticsInvoiceId"),0) "NVL0"
FROM "CurrentInvoices" "t0"
WHERE "t0"."Organization" IN (N'Vision Operations', N'Vision Services') AND "t0"."__IsValidValue" <> 0 AND "t0"."Organization" IN (N'Vision Operations', N'Vision Services') AND (CASE
                        WHEN "t0"."WorkitemId" IS NOT NULL AND "t0"."Queue" = N'Pending Payment' THEN 1
                        WHEN (CASE WHEN "t0"."DocumentGuid" IS NULL AND "t0"."WorkitemId" IS NULL THEN 1 ELSE 0 END) = 1 AND "t0"."ReadyForPayment" = 1 THEN 1
                        ELSE 0
            END) = 0 AND (CASE WHEN "t0"."WorkitemId" IS NOT NULL OR ("t0"."DocumentGuid" IS NOT NULL AND "t0"."IsFinished" = 1) THEN 1 ELSE 0 END) = 1
2019-05-15 02:29:51,119 [7] INFO  - /* Execution time: 00:00:00.6184811 */

 

Applies to:  

Product Version Category
KAMV 1.x  

 

Author:  Dave Paffett