How Calendar Details Are Stored In Orchestrator Database?

How calendar details are stored in Orchestrator database?

  • The calendar related details are stored in below tables in Orchestrator database
    • [dbo].[Calendars]
    • [quartz].[QRTZ_CALENDARS]
  • "Calendar" column in [quartz].[QRTZ_CALENDARS] table stores the actual data(days and holidays) selected in the calendar. The datatype of this column is image data-type which means it can store the calendar as a sequence of binary values. i.e When the dates are selected in a calendar, it gets converted into a sequence of binary values and gets stored in the database.
    The conversion is handled using the code behind it.
The below SQL query can be used to convert the image datatype to varchar
  • select cast(cast(CALENDAR as varbinary(max)) as varchar(max)) as column_name
    from   [quartz].[QRTZ_CALENDARS]
The output of the query would like below,
  • {"$type":"Quartz.Impl.Calendar.HolidayCalendar, Quartz","Description":null,"TimeZoneId":"UTC","BaseCalendar":null,"ExcludedDates":["2020-11-11T00:00:00"]}

In the above result, Excluded dates refer to the holidays. All other days except these are working days.

Read more on How to Read the Value of Image Data Type to Plain Text?