SET SESSION ACCOUNT Syntax Elements - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
wgr1555383704548.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™
account_string
An account string assigned in the user or profile definition for the logged on user. If the account string is not valid for the user, an error occurs.
Changing the account string changes the access level for the session or request only if different workload management rules apply to the new account.
A user cannot use the SQL version of the SET SESSION ACCOUNT command to change the account for any other user.
To change accounts for another user, you can use the Performance Manager SET SESSION ACCOUNT command. See Teradata Vantage™ - Application Programming Reference, B035-1090.
For information about account string options and session priorities, see Teradata Vantage™ - Database Administration, B035-1093.
For information about creating accounts, see CREATE USER or CREATE PROFILE.
SESSION
Specifies that the account is changed for the remainder of the session.
You cannot undo this request within the current session. To revoke a session-level account change, a user must log off the session, then log back on, at which point the system assigns the user default priority.
REQUEST
Specifies that the account is changed for the next request only (next being defined as the first request this user performs after the current SET SESSION ACCOUNT request).
After that, the previous account resumes.
The specified account information is kept in volatile memory, not in DBC.SessionTbl, so a subsequent transparent system reset and recovery effectively voids this request. To be sure the request performs correctly, set SET CRASH to NOWAIT_TELL or verify the result.