Automation script to Creation and removal of partitions
I am plannin to create an automated partition management script.
This will have to be scheduled monthly to create and remove the partitions needed.
This script will also insert every beginning of the month a row with following values:
- FILEDATE_KEY: (Y)YMMDD (example: 91201 or 100101)
- FILEDATE_DT: DD/MM/YYYY (example: 01/12/2009 or 01/01/2010)
Naming of Partitions :
To be inline with the other tables, the naming of the partitions of F_TAB_CUST should be changed to follow the logic in the other partitioned tables:
The name of the partition holding data for which the FILEDATE_KEY is smaller than yymmdd should be called <PREFIX>_YYYYMM where YYYYMM corresponds to 1 month later than yymm of the FILEDATE_KEY.