To enable ASE, define one or more of the ASE variables in an account string either directly in the user definition (with the CREATE USER statement), or in the definition of the profile assigned to the user (with the CREATE PROFILE statement). You should set up the account to default to automatically use ASE.
You assign two account strings to user TAW. The first entry is the default.
MODIFY USER TAW AS ACCOUNT=('$M2$acct&S&D&H','$M2$finr&S&D&H');
When TAW logs on without specifying an account, TAW will default to using the first account. At query execution time, Teradata Database replaces &S with the session number, &D with the current date, and replaces &H with the current hour.
In another case, you assign two account strings to user DTG. However, the first (default) account string does not specify session, date, or hour expansion:
MODIFY USER DTG AS ACCOUNT = ('$M1$acct', '$M2$acct&S&D&H');
When DTG logs in without specifying an account, then the ASE logging does not occur. To initiate them, DTG must type &S&D&H in the account string either when he logs in or during the session:
SET SESSION ACCOUNT='$M2$acct&S&D&H'
Because assigning the first account to DTG without ASE variables means ASE logging does not occur by default, Teradata does not recommend listing the account without &S&D&H in the account string first.
In another case, assume you omit the ASE variables in the two account strings for user AM1:
MODIFY USER AM1 AS ACCOUNT=('$M2$acc1', '$M2$acc2');
AM1 cannot invoke the ASE feature at any time. Teradata does not recommend assigning the first account string without the &S&D&H variables.