Service Operations Insight

Tech Tip: Extend the date range in DAY_DIM table 

Feb 16, 2017 09:35 AM

Looking to the future, the current contents of the DAY_DIM table in Data Manager database range from 1990-01-01 to 2021-01-01.  For end users loading / creating 24 month forward-looking forecasts, that end date is starting to edge closer.  Better to take preventative measures early (after all, we're in the business of being proactive ).

 

The attached SQL scripts can be executed to:

   1) Check the current date range in DAY_DIM

   2) Extend it by 10 years to 2031-01-01

   3) Optional - Check the new date range in DAY_DIM after running the second script

 

They can be run via SQLPlus or SQL Developer (other SQL IDEs are available) as the environment allows.

 

Important: Business Hour Windows and 'Day of the Week'

One small but important point to consider for non-US installations is that Oracle defines a different 'first day of the week' in different locales - in the US, it is Sunday, in most of Europe it is Monday for example - if using the Business Hours functionality, 'Day of the Week' is an important consideration.

Since the install requirements have America-American as the required locale, and the Internationalization Tech Note from CA Services also recommends setting the Oracle session settings to America-American with a logon trigger, the attached Extend_Day_Dim_DateRange.sql script also sets the session locale to America-American to improve consistency.

If there is any concern, run the Check_Day_Dim_DateRange.sql script and check the Day_Of_Week and Day_Num_in_Week columns for consistency - modify the script as appropriate if needed.

Statistics
0 Favorited
4 Views
2 Files
0 Shares
0 Downloads
Attachment(s)
zip file
Check_Day_Dim_DateRange.sql.zip   426 B   1 version
Uploaded - May 29, 2019
zip file
Extend_Day_Dim_DateRange.sql.zip   1 KB   1 version
Uploaded - May 29, 2019

Related Entries and Links

No Related Resource entered.