All Forums Database
mm185159 21 posts Joined 03/11
23 Jun 2016
Transaction QUERY_BAND not working

Whenever I set a Transaction Query_Band, the only statement recorded in QryLog table is the SET QUERY_BAND= statement. The following SQL transaction does have the Transaction QueryBand Name/Value pair associated with it.
By Example:
SET QUERY_BAND='STEP=1.0;' FOR TRANSACTION
;insert into DBA_SANDBOX.EPIC21_gt_svc_agmt_sample_list
...
From Query Log Table:
 

QueryBand

QueryText

=S> Jobname=EPIC21;benchmark=TestQB;

SET QUERY_BAND = 'Jobname=EPIC21;benchmark=TestQB;

=T> STEP=1.0; =S> Jobname=EPIC21;benchmark=TestQB;

SET QUERY_BAND = 'STEP=1.0;' FOR TRANSACTION ;                                                      

=S> Jobname=EPIC21;benchmark=TestQB;

INSERT INTO DBA_SANDBOX.EPIC21_g

=T> STEP=1.1; =S> Jobname=EPIC21;benchmark=TestQB;

SET QUERY_BAND = 'STEP=1.1;' FOR TRANSACTION ;                                                      

=S> Jobname=EPIC21;benchmark=TestQB;

collect statistics on             

 
 
 
 
 

 

Fred 1096 posts Joined 08/04
23 Jun 2016

How are you submitting these statements? The semicolon at the start of the line is BTEQ-specific syntax for a multistatement request.

mm185159 21 posts Joined 03/11
27 Jun 2016

So, your right, it is more like BTEQ. So far, the only way I can get it work is to use BT/ET and set the transaction qb as the first statement after the BT; statement.
Seems to be cumbersome, especially if you have many sequences where you need to change the qb for each transaction.
Any thoughts?
Example:
BT;
 SET QUERY_BAND='STEP=3.2;' UPDATE FOR TRANSACTION;
 collect statistics on temporary DBA_SANDBOX.EPIC21_gt_usg_list column (sp_id, usg_dt, int_hour, ener_dir_cd, wea_stn_cd);
ET;

hvganipineni 14 posts Joined 09/09
27 Jun 2016

You can use a simple 
BEGIN CODE;
--Set Query Band
Multiple statements.
END CODE;
 
Let me know if it doesnt work. 

Harsha Ganipineni

You must sign in to leave a comment.