Products | Versions |
---|---|
TIBCO Data Virtualization | 7.0.x and higher |
The steps to log SQL queries and their results are below.
1. Set Studio >> Administration >> Configuration >> Data Sources >> Common to Multiple Source Types >> Trace Level to 3
2. Run the SQL query
3. Open <TDV_INSTALL>\logs\cs_server_dsrc.log, and look for the query and the results.
Example 1
Assume the following query runs in TDV Studio's Scratchpad:
select
title, firstname
from
/shared/examples/ds_orders/tutorial/employees
where
firstname = 'Joseph' or firstname = 'AnnMarie'
It results in the following entries in cs_server_dsrc.log:
------------
INFO 2019-05-07 08:11:01.427 -0700 datasource - Thread: jetty thread pool-1613|2400219|2500032|ds_orders|QUERY CREATED|SELECT "tutorial"."employees"."title","tutorial"."employees"."firstname" FROM "tutorial"."employees" WHERE RTRIM(UPPER("tutorial"."employees"."firstname")) IN ('JOSEPH','ANNMARIE')
INFO 2019-05-07 08:11:01.428 -0700 datasource - Thread: LoadPipeThread (jetty thread pool-1613)|QUERY STARTED|SELECT "tutorial"."employees"."title","tutorial"."employees"."firstname" FROM "tutorial"."employees" WHERE RTRIM(UPPER("tutorial"."employees"."firstname")) IN ('JOSEPH','ANNMARIE')
INFO 2019-05-07 08:11:01.430 -0700 datasource - Thread: LoadPipeThread (jetty thread pool-1613)|QUERY EXECUTED|SELECT "tutorial"."employees"."title","tutorial"."employees"."firstname" FROM "tutorial"."employees" WHERE RTRIM(UPPER("tutorial"."employees"."firstname")) IN ('JOSEPH','ANNMARIE')
INFO 2019-05-07 08:11:01.430 -0700 datasource - Thread: LoadPipeThread (jetty thread pool-1613)|DATA FETCH FIRST ROW RECEIVED|
INFO 2019-05-07 08:11:01.430 -0700 datasource - Thread: LoadPipeThread (jetty thread pool-1613)|DATA|Engineer|Joseph|
INFO 2019-05-07 08:11:01.430 -0700 datasource - Thread: LoadPipeThread (jetty thread pool-1613)|DATA|Systems Support|AnnMarie|
------------
Example 2
Assume that after /shared/examples/ViewOrder is published, the following query is sent from DBVisualizer or Squirrel:
select * from ViewOrder;
Then, the entries in cs_server_dsrc.log will appear as below:
------------
INFO 2019-05-07 06:37:42.089 -0700 datasource - Thread: DBChannel-9|DATA FETCH FIRST ROW RECEIVED|
INFO 2019-05-07 06:37:42.092 -0700 datasource - Thread: DBChannel-9|DATA|2|1|0.10|2003-02-03|Able Computing|Jason|Born|(510) 556-9944|
INFO 2019-05-07 06:37:42.092 -0700 datasource - Thread: DBChannel-9|DATA|3|2|0.20|2003-02-03|Anston Systems|Max|Fagan|(650) 778-9900|
INFO 2019-05-07 06:37:42.092 -0700 datasource - Thread: DBChannel-9|DATA|7|3|0.00|2003-02-07|Dickinson Associates|George|Black|(410) 775-0736|
------------