Teradata QS server follows these steps when attempting to run a scheduled request job:
- Retrieves information about the request from the Teradata QS database.
- Logs on to the database as the user, with an optional account name.
- If a results table/file was specified and the results table/file currently exists, the job fails unless the user specified that the results could be deleted.
- Runs the request.
- Reschedules the job for at least 15 minutes later if a Teradata Database workload management restriction is encountered.
- If a Teradata Database workload management restriction will cause the job to fail, the job is rescheduled to run at a time when the restriction is not in effect.
When a job needs to be rescheduled, an updated execution time is computed. If the updated time exceeds the start interval for the job, the status of the job is marked as restricted because it will not be completed within its execution time frame.
- If a results table/file was specified, the last statement of the scheduled request is first run in ‘prepare’ mode to obtain the column types and names of the result data. If necessary, the result table/file is recreated with those column types, and the last statement (which must be a SELECT statement) is run. Then the result data is written to the results table/file.