There are several reserved Query Band keys that are used by the Advanced SQL Engine, and other Teradata Utilities for logging, performance measuring, workload management, and other purposes. The value of the QueryIssueTime key will be set by the provider if the application has not set them. These keys will be set only if the QueryBand attribute has been specified in the Connection String, or when TdConnection.ChangeQueryBand has been called.
The following are the reserved Query Band keys. All the keys are represented as properties in the TdQueryBand class. The keys can also be created using the Add method, or using the indexer. The following are examples:
C# |
Copy Code |
---|---|
TdQueryBand qb = new TdQueryBand(); qb.ProxyUser = "user1"; qb.Add("ProxyUser", "user1"); qb["ProxyUser"] = "user1"; |
Reserved Key | Data Type | Auto Generated | Additional Info | ||||
---|---|---|---|---|---|---|---|
Action | String | No |
Description: The user action that generated the command. Default Value: String.Empty Usage: Debugging, Logging | ||||
ApplicationName | String | No |
Description: The name or identifier of the application that generated the query. Default Value: String.Empty Usage: Logging, Auditing, Workload Management | ||||
ClientUser | String | No |
Description: The unique identifier of the user that submitted the command. Default Value: String.Empty Usage: Individual resource usage, Accounting, Logging, Workload Management, Query Status Notification, Query Support | ||||
Deadline | DateTimeOffset | No |
Description: Enables Workload Management to priortize workload so that the command can complete before the specified time. .Default Value: String.Empty Usage: Workload Management Comments: The value of the DateTimeOffset must account for the UTC offset. Therefore, if the date and time is 2009-10-10 14:00:00-08:00 the value must be 2009-10-10T20:00:00Z | ||||
Destination | String | No |
Description: The location within a given Teradata system to which a query is directed. This typically consists of the Database and Table names. Default Value: String.Empty Usage: Auditing, Workload Management | ||||
Group | String | No |
Description: The user's work group. Default Value: String.Empty Usage: Group resource usage accounting, Logging, Workload Management, Query Status Notification, Query Support | ||||
Importance | String | No |
Description: The importance of the query as it relates to the amount of priority that it is given. Default Value: String.Empty Usage: Workload Management | ||||
JobDeadline | DateTimeOffset | No |
Description: Used to indicate when a given unit of work needs to be completed. Default Value: DateTimeOffset.MinValue (0001-01-01T00:00:00.000000Z) Usage: Workload Management. Comments: The value of the DateTimeOffset must account for the UTC offset. Therefore, if the date and time is 2009-10-10 14:00:00-08:00 the value must be 2009-10-10T20:00:00Z | ||||
JobId | String | No |
Description: The Job ID value allows a series of queries to be issued against a single workload. Default Value: String.Empty Usage: Workload Management, Auditing, Logging | ||||
JobLen | String | No |
Description: Number of pieces of work that constitute a unit of work. Default Value: String.Empty Usage: Workload Management, Auditing | ||||
JobSeq | String | No |
Description: Sequence number of the job within a unit of work that is contained in a single workload. Default Value: String.Empty Usage: Workload Management, Auditing | ||||
MaxQueryTime | Int32 | No |
Description: Maximum amount of time a command has to execute. Default Value: -1 Usage: Workload Management | ||||
ProxyRole | String | No |
Description: The Proxy Role that the command will be executed under. Default Value: String.Empty Usage: Security | ||||
ProxyUser | String | No |
Description: The Proxy User identity that the command will executed under. Default Value: String.Empty Usage: Security | ||||
Redrive | String | No |
Description: Enables or disables Redrive in the session. Default Value: String.Empty Usage: Workload Management | ||||
QueryIssueTime | DateTimeOffset | Yes |
Description: UTC time that a Query was issued from the application to the database Default Value: DateTimeOffset.MinValue (0001-01-01T00:00:00.000000Z) Usage: Debugging, Logging Comments: The value of the DateTimeOffset must account for the UTC offset. Therefore, if the date and time is 2009-10-10 14:00:00-08:00 the value must be 2009-10-10T20:00:00Z If the application has not set the value of this key, the provider will use the clock of the application's environment to set this value. Although this a Reserved keyword, TdQueryBand does not contain a corresponding property for QueryIssueTime. If an application needs to specify a value for this key, it must be created as a custom property. For example:
| ||||
Source | String | No |
Description: Identifies where a command was executed within the application. Default Value: String.Empty Usage: Debugging, Logging | ||||
StartTime | DateTimeOffset | No |
Description: The start time of a single thread of execution within the application. Default Value: String.Empty Usage: Performance Measurement, Auditing, Logging Comments: The value of the DateTimeOffset must account for the UTC offset. Therefore, if the date and time is 2009-10-10 14:00:00-08:00 the value must be 2009-10-10T20:00:00Z | ||||
Version | String | No |
Description: The version number of the application that has submitted the command. Default Value: String.Empty Usage: Logging, Auditing, Debugging |