Query band information is used by Teradata Viewpoint for workload classification and by the Database Query Log for logging. Vantage logs query bands in DBC.DBQLogTbl, as explained by the following table.
IF you create … | THEN the query band text contains … |
---|---|
no query band | an empty string. |
only a transaction query band | the following string: =T> transaction_queryband where the transaction_queryband string element specifies the query band for the current transaction. |
only a session query band | the following string: =S> session_queryband where the session_queryband string element specifies the query band for the current session. |
both a transaction query band and a session query band | the following concatenated string: =T> transaction_queryband =S> session_queryband where:
For example, a combined session and transaction level query band might look like the following string: =T> job=x1; =S> org=Finance;report=Fin123; |
The state of a query band must be static once the query has been processed by those features; therefore, you cannot change a query band once its defining request has been dispatched.
- Associate a query band name:value pair with a filter rule.
- Set a query band name:value pair as part of the workload classification.
- Specify PROXYUSER as the name in a name:value pair, for example,
PROXYUSER=proxy_user_name
When Teradata Viewpoint compares rules and classification criteria to the query bands, it uses the first name:value pair found in the query bands in which the name in the name:value pair matches the name in the criteria to determine if it should use the rule or classification.
- Restrict access to a database object based on the request query band.
- Classify a request into a specific workload based on its query band.
If a query band specifies both a transaction query band and a session query band, and both have the same name, Teradata Viewpoint always uses the name:value pair in the transaction query band.
Vantage searches the query bands in the following order.
- Transaction query band
- Session query band
All comparisons are case insensitive.
You can specify a classification object to match query band name:value pairs. The definition contains the query band name with a values include or values exclude list.
See Function of Query Bands and Teradata Vantage™ - Database Administration, B035-1093 for details.