SET SESSION CALENDAR
Rules and Restrictions for SET SESSION CALENDAR
The following rules and restrictions apply to SET SESSION CALENDAR requests.
You cannot specify a user‑defined business calendar.
A new logon always sets the session to the system‑defined business calendar Teradata by default, but you can change the default using a SET SESSION CALENDAR request.
You can also include a SET SESSION CALENDAR request in the startup string for a user to set the calendar to something other than the default Teradata calendar. Setting the session calendar in the STARTUP string may result in inconsistent behavior during connection pooling.
The following CREATE USER statement uses the STARTUP string option to set the default session calendar for user abc to ISO.
CREATE USER abc AS
SPOOL = 1200000,
STARTUP=’SET SESSION CALENDAR=ISO’;
For example, if an expansion is by WEEK_BEGIN, the expansion is done by MONDAY for the ISO calendar and by SUNDAY for the Teradata calendar.
The calendar name for the session is stored in DBC.SessionTbl, so if a restart occurs, the session can be reestablished with the same business calendar that was set before the restart occurred.