QUERY BAND MEANING AND ERRORS

Database
Enthusiast

QUERY BAND MEANING AND ERRORS

Hi Team

I just started over this phase 2 of a project and the team which was initially loading the tables were setting the query band function  in the BTEQ

SET QUERY_BAND = 'ApplicationName=xxxx.bteq;Frequency=DAILY;' FOR SESSION   ;

Can you explain me what does this function actually do?

Also there when one of my existing user is trying to pull the report on this particular TD database " A query_band value exceeds its maximum length"

Can this possibly be related to the practice used while pulling the data to the semantic layer as the BTEQ is actually developed for loading sementic layers only.

Please help 

Thanks !!

2 REPLIES
Enthusiast

Re: QUERY BAND MEANING AND ERRORS

This link may give a good picture of what Query band's purposes and keys:


Also this link for Trusted sessions:


Query band is value:name pair. Example,say when you write a Java method or C# function , you may set up Query bands that will define the connection like 

public void qryband1 ()

{

TdConnectionStringBuilder con1 = new TdConnectionStringBuilder();

con1.DataSource = "tdat1";

   con1.UserId = "user1";

   con1.Password = "pass1";

   //Setting up two Query Bands defining connection

   con1.QueryBand = "ProxyUser=puser1;ApplicationName=app1;";

   TdConnection conn = TdConnection(connBuilder.ConnectionString);

   conn.Open();

   // retrieve query bands from connection

   TdQueryBand qb = conn.QueryBand;

......

}

In simple language, it is just like assigning variable 

ApplicationName=xxxx.bteq 

Frequency=DAILY for that session.

Enthusiast

Re: QUERY BAND MEANING AND ERRORS

thanks for the help :) I will have a look at the link