OFS Scheduler | VantageCloud Lake - OFS Scheduler - Teradata VantageCloud Lake

Lake - Manage and Move Data

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-05-16
dita:mapPath
atx1683670417382.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
atx1683670417382

Tables in the Object File System are versioned, and rows are stored in objects. Insert, update, and delete operations create new versions of the table. When a row is deleted from the table rather than deleting the row from the object, a new object is created without the row. The latest version of the table is the current version. Previous versions of the table are retained for a retention period. The default retention period is 30 days. When a previous version is older than the retention period, the version is obsolete. Obsolete versions are removed by a stored procedure in the database TD_OFSDB. The user TD_OFS has the privilege to run the purge stored procedure.

Users, with the appropriate permissions, can use Object File System (OFS) Scheduler to purge their older tables, and to cancel their purge jobs. Administrators use OFS Scheduler to schedule when to run the purge jobs on all older tables, to cancel all current purge requests, to start the scheduler, and to stop the scheduler from accepting new jobs.

The OFS Scheduler runs the purge stored procedure on behalf of user TD_OFS. The user TD_OFS can do the following scheduler commands:
  • AlterJob: Set schedule for a job.
  • AbortJob: Cancel a running job. Subsequent scheduled jobs are not affected.
Administrators can do the following scheduler commands:
  • AlterJobAdmin: Set job schedules.
  • AbortJobAdmin: Cancel all running jobs. Subsequent scheduled jobs are not affected.
  • StartScheduler: Start the OFS Scheduler. Jobs start at their next scheduled time.
  • StopScheduler: Stop the OFS Scheduler from submitting new jobs. Any running requests are allowed to complete.

ScheduleString Syntax

ScheduleString supports up to 32 sessions.

{ RUN 
     {   ONCE
       | REPEAT <repeat_string> 
       | AFTER  <before_job_name> [{ SUCCEEDS | FAIL }]
     }
}
<repeat_string> = <day_string><hour_string> [<day_string><hour_string>…]
 
<day_string> = DAYS = day_num[,… | - day_num];]
 
<hour_string> = HOURS = hour_num[,… | - hour_num];]

Scheduled Jobs

OFS Scheduler is started automatically. The following jobs are scheduled to run.

UserName JobName RunEnabled ScheduleString
TD_ScheduleINT MoveHistory T REPEAT DAYS=1-7; HOURS=0
TD_OFS MoveOFSLog T REPEAT DAYS=1-7; HOURS=0
TD_OFS MoveReorgLog T REPEAT DAYS=1-7; HOURS=0
TD_OFS PurgeAllOldVersions T REPEAT DAYS=1-7; HOURS=0-23
TD_OFS ReorganizeTablesPrep T REPEAT DAYS=1-7; HOURS=0-23
TD_OFS ReorganizeTables T RUN AFTER REORGANIZETABLESPREP

The following query and result show the check for jobs at the next runtime.

Query
sel JobId, JobName (char(30)), NextRuntime from TD_ScheduleDB.JobTbl order by 1;
Result
      JobId  JobName                                              NextRuntime
-----------  ------------------------------  --------------------------------
          8  PurgeAllOldVersions             2025-01-10 00:00:00.000000-00:00
          9  MoveHistory                     2025-01-10 00:00:00.000000-00:00
         10  MoveOFSLog                      2025-01-10 00:00:00.000000-00:00
         11  MoveReorgLog                    2025-01-10 00:00:00.000000-00:00
         12  ReorganizeTablesPrep            2025-01-10 00:00:00.000000-00:00
         13  ReorganizeTables                                               ?

Database and Users for OFS Scheduler

The TD_ScheduleDB database stores the tables, views, and procedures for the OFS scheduler. User DBC has the following privileges on TD_ScheduleDB:
  • SELECT
  • CREATE TABLE
  • CREATE PROCEDURE
  • INSERT
  • UPDATE
  • DELETE

The scheduler has users TD_Schedule and TD_ScheduleINT that have permissions on the TD_ScheduleDB database. TD_Schedule is for users, and TD_ScheduleINT is used by the scheduler to maintain the tables in TD_ScheduleDB.

Reorganization of OFS Tables

While the OFS scheduler handles table organization and purging, administrators can use scheduler jobs and procedures to exclude tables and databases from this process. See Reorganizing OFS Tables using OFS Scheduler.