15.10 - Creating Account Strings - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Release Number
15.10
Release Date
December 2015
Content Type
Programming Reference
Publication ID
B035-1144-151K
Language
English (United States)

For best results, an account string should follow this format:

‘$P0+account_ID&S&D&H

If a user or profile definition specifies more than one account string, separate the individual strings with commas and enclose the entire list of strings with parentheses.

The $G0 portion of the account string has a different meaning depending on whether the Teradata Database system runs on SUSE Linux Enterprise Server 10 or 11. Make sure you know the OS version for your system before creating account strings.

The following tables describe account string elements.

Additional account string options are available, see Database Administration, B035-1093.

Required Account String Variables

Element Description
$P0+ The $ character is required to begin an account string.

For SLES 10 systems, P is the performance group identifier, which determines the default priority for a user session.

For SLES 11 systems, P is only an indicator of the access level for the workload definition associated with the account. The access level for an account is actually determined by settings in the Viewpoint Workload Management portlet.

  • $R0+ = Rush (Top)
  • $H0+ = High
  • $M0+ = Medium (default)
  • $L0+ = Low
The 0 and + characters are not actually part of the priority/access level:
  • The 0 position can be used to designate the virtual partition (resource partition), as defined by the priority scheduler utility, on SLES 10 systems. On SLES 11 systems it is a placeholder.
  • The + character is a placeholder that forces the account_ID to start at the fifth character, which is important for compatibility with certain administrative tools.
account_ID A four character string that uniquely identifies the account.

Recommendation: You can use the account_ID to differentiate among accounts and describe the account function.

  • Department such as finance (FIN) or marketing (MKT)
  • Job function such as batch processing (B), general use (G), or update (U).

For example:

FINB or MKTU

Although more characters are allowed, using a four-character account_ID maintains compatibility with legacy applications.

Account String Expansion (ASE) Variables

Teradata Database tags each session with information specified by the ASE variables for later use in management of database sessions. Each ASE variable expands to the number of characters needed to express the related information. The 30 character string limit is enforced against the expanded form.

Specification of the ASE variables shown below is optional, but recommended. Other variables are available. See Database Administration, B035-1093.

Element Description
&S

&D

&H

The ampersand (&) designates a set of account string expansion (ASE) variables. Teradata Database automatically replaces these variables with actual values when the system establishes a session. You can use ASE variables for resource accounting and charge-back, for example, charging users a premium for resource usage during peak hours.

For example, you can use any or all of the following common ASE variables:

  • &S = session number (9 digits, system generated)
  • &D = date (for example, July 4, 2009 appears as 090704)
  • &H = time (2 digits, based on the 24-hour clock)

The system records database activity in the DBC.Acctg table and DBC.AmpUsageV view by account, substituting the actual value for any specified ASE variables. A new entry appears in DBC.Acctg if a variable value changes during the session, for example, an hour change from 16 to 17.

Each row includes information on CPU, I/O, and vproc usage. See Data Dictionary, B035-1092

Additional ASE variables are available. See Database Administration, B035-1093.