SQL Statement to retrieve Information about "Recurring Jobs" from Activities Window

Document ID : KB000088426
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
!NOTE: Please test in Test-Environment before running in Production Environment
 
Sql-Statement to retrieve Information about recurring Jobs from Activities Window:
In certain situations it is necessary to retrieve Information about recurring Jobs from the Activities Window.
For example a Production Down where a Login Into the System is not possible anymore and Jobs needs to be deleted from Activities Window.
 
Before deleting Information from the Activities Window, it is necessary to find out what Jobs are currently in the Activities Window so they can be rescheduled again manually after the System is back up and running.
 
Resolution:
The following statement will retrieve all information that is necessary to restart recurring tasks manually after they are deleted from the Activities Window.
 
Select EH_Client as Client,
 EH_Name as Object_Name,
 EH_Otype as Object_Type,
 EH_AH_Idnr as Run_ID,
 AH_Timestamp1 as Activation_Time,
 EH_StartTime as Start_Time,
 AH_Timestamp4 as End_Time,
 EH_LastOccur As Last_Occurence,
 EH_NextCheck as Next_Occurence,
 EH_Status as Status,
 EH_OccurCount as Occur_Count,
 EPD_FreqMode as Recurring_Setting_FreqMode,
  EPD_Every as Recurring_Setting_Every,
  EPD_Gap as Recurring_Setting_With_Gap,
  EPD_Once as Recurring_Setting_At_Time,
  EPD_Overlap as Recurring_Setting_Overlap,
  EPD_FromTime as Recurring_Setting_FromTime,
  EPD_ToTime as Recurring_Setting_ToTime,
  EPD_Adjust as Recurring_Setting_AdjustToTimeframe,
  EPD_RangeMode as Recurring_Setting_Range,
  EPD_RangeStart as Recurring_Setting_Range_Start,
  EPD_RangeEnd as Recurring_Setting_Range_End,
  EPD_MaxRuns as Recurring_Setting_Range_After_Runs,
  EPD_DaysMode as Recurring_Setting_Cal_Or_Days,
  EPD_Weekdays as Recurring_Setting_WeekDays,
  EPD_TZ as Recurring_Setting_Time_Zone
  from EH
 inner join AH on AH_IDNR = EH_AH_IDNR
 INNER JOIN EPD ON AH_Idnr = EPD_AH_Idnr
 left join EPDC on AH_Idnr = EPDC_AH_Idnr
 Where EH_Otype = 'C_Period'
 Order by EH_Client ,EH_Otype, AH_Timestamp4;
 
NOTE! All Time Information retrieved from database is in UTC time!
 
Here a graphical explanation on the Information retrieved:
 
 
.png

You can find more information about the tables in the structure folder of the DB folder.