Database Operation Task

The Database Operation task allows you to perform any of the following operations against a relational database:

  • Execute a job on the database server
  • Execute database update scripts
  • Select a single row/column value into a Job Variable
  • Select datasets (recordsets) that can be saved to a file or passed to a script for processing

adTempus supports the following database servers:

  • SQL Server
  • Oracle
  • MySQL
  • Other data sources with an OleDb or ODBC driver installed

Reviewing Task Output

If your database operation fails, error information will be written to the Job Log. Regardless of whether the operation succeeds or fails, more detailed information (such as commands executed and number of rows updated) can be found in the Job Detail Log.

adTempus also records each command executed and the results returned in a temporary file that is available for the duration of the job. This file can be used by scripts or other processes within the job to examine the results of the task. After the step executes, the name of the file can be found in the "DatabaseTask.DatabaseResultFile" job variable. This file is also saved as a Captured File in the job history, with name "Database Results.txt".

Job Variables

This task creates the following Job Variables, which are available for the remainder of the job:

Variable Description
DatabaseTask.DatabaseResultFile The path and file name of the file that contains commands executed and results returned by the database.
DatabaseTask.DataSetFileNames A semicolon-delimited list of the file(s) the DataSet data was saved to, if using the option to save DataSet data.