Download (direct link):
the user has a profile with no accounts the first account defined in the user or database definition, if any.
the user has no profile the first account defined in the user or database definition, if any. Otherwise, see below.
no account is defined at all determined as follows:
IF no account is specified for ... THEN the default is .
a database the account of the immediate owner of the database.
a user without a profile assignment the account of the immediate owner of the user.
a profile none for the profile itself. A NULL is inserted in DBC.Profiles.DefaultAccount.
members of a profile with a NULL account the first account in the user definition, if any; otherwise, the account of the immediate owner of the user.
multiple accounts are defined
the first account in the definition string.
Note: The remaining definitions are stored in the DBC.Accounts table to be used for validation of user-specified accounts.
The rest of this section discusses defining an account priority, nicing a query, finding session statistics, and defining ASE variables. For syntax details, see the ACCOUNT keyword under "CREATE USER" and "CREATE PROFILE" in Teradata RDBMS SQL Reference, Volume 4.
5 - 40 Teradata RDBMS Database Administration
Chapter 5: Setting Up Users, Profiles, Accounts and Accounting
System Accounting Functions
Accounts and Performance Group Names
A session always runs under an account ID and a Priority Scheduler performance group. The performance group portion of the account string indicates the relative service priority for the account. Performance group names, their relative levels of service, and other related parameters are either:
• Assigned by default
• Defined by you as customized variables, per user or profile (based on the parameters you established using the Priority Scheduler schmon or xschmon utility, or the Teradata Manager Priority Scheduler Administrator; for details, see "Managing Resources with Priority Scheduler" on page 15-9).
In the following example, note the definitions for ACCOUNT:
CREATE USER DBA01 ,FROM DBA_PROF , AS PERManent=0 ,SPOOL=1000000 ,PASSWORD=DBA01 ,FALLBACK
Name of the user being created (DBA01)
Present owner of space
Amount of permanent space
Amount of spool space
Password logon protection
Table data protections default
$M2$ - A specified Performance Group name
&H - Hour ASE variable, unqualified with &D (statistics collected for a specified hour on one day will be summed with existing statistics for the same hour on other days)
acct101 - account ID
When you log on to Teradata RDBMS, the performance group for the initial session is determined as follows:
IF a. THEN the session runs under .
custom account is specified or determined by default that account ID. (For more details, see "Finding the Default Account" on page 5-21.)
custom account ID is not determined (not defined for your logon user name or its profile, and not specified at logon) your logon user name.
performance group is not defined for the account under which the session is initiated performance group M.
5 - 40
Teradata RDBMS Database AdministrationChapter 5: Setting Up Users, Profiles, Accounts and Accounting
System Accounting Functions
Once a session is active, the associated account can be changed during runtime. The performance group, whether initially set by specification or by default, also can be changed at any time, at either the session level or the query level.
Thus, at any point in time, every session and its executing query are running under:
• The performance group established at logon time
• The performance group the user modified dynamically by:
• Issuing a Teradata SQL SET SESSION ACCOUNT. ..FOR [SESSION/REQUEST] statement, or a Performance Monitor SET SESSION ACCOUNT request, during the current session.
• Embedding Teradata SQL SET SESSION ACCOUNT statements in the executing program or BTEQ script.
• The performance group dynamically imposed by you, as the database administrator, on the current:
• Session, via Teradata Manager Performance Monitor session control
• Request or session, using the Teradata Performance Monitor program (from the Windows 2000 Start -> Programs menu) or the PM/API SET SESSION ACCOUNT request.
Changing the Performance Group of a Running Job
You can change not only the account ID and ASE codes, but also the performance group of the account under which a session is running.
You can change these parameters at the session or query level, depending on the session being changed and the authorization of the user submitting the change.
A dynamic account change is accepted only if the specified account has been already defined for that user in a CREATE/MODIFY USER/PROFILE statement.
DBC.Accounts is searched first for a corresponding profile/account pair, then a user/account pair, to verify that the user can run under that account.