Query Band Overview | Teradata Data Mover - 17.11 - About Query Band - Teradata Data Mover

Teradata® Data Mover User Guide

Teradata Data Mover
Release Number
Release Date
October 2021
Content Type
User Guide
Publication ID
English (United States)
The query band is a set of user-defined name-value pairs used to uniquely identify a session or transaction in the Teradata Database. Uses of the query band to tag a session or transaction include the following:
  • Grouping requests into arbitrary jobs for accounting and control purposes
  • Asserting a proxy user or proxy role for a trusted session
  • Debugging performance problems
  • Defining system variables
Examples of the query band definition:
If query band definition is Because it


follows syntactical rules: Job=payroll;Userid=aa1000000;Jobsession=1122;


uses the = character in the name: Job=payroll;User=id=aa1000000;Jobsession=1122;

The table below lists what happens in certain query band scenarios.
Scenario Description
The query band contains
  • =
  • ;
  • \u0000 (the NULL character)
Returns an error
The query band exceeds 2048 characters, not counting white space padding Returns an error
The query band definition repeats a name in a name-value pair Returns an error
A name-value pair does not end with a ; Returns an error
The name is more than 128 characters Returns an error
The value is more than 256 characters Returns an error
The value is 0 characters Allows the query band definition, but does not pass a value for the associated name
For detailed information about the query band feature using valid key-value pair, see Teradata® Database SQL Data Definition Language - Syntax and Examples, B035-1144.