SQL script task

A SQL script task will execute the same SQL script on several databases concurrently.

When to use a SQL script task

A good use case is the weekly launch of a SQL script to reclaims unused space, reorganizes indexes and tables, and defragments data files.

Restrictions

Log file is populated only when a SQL script is run on a PostgreSQL database.

Task characteristics

In addition to the common task characteristics, here are those specific to SQL script tasks.

Database Set filter

Filter (by names and tags) the databases on which the sql script will be run.

NB: This filter is combined with the filter applied at the project level.

Max. number of script execution retries per database

Maximum number of retry attempts if the SQL script execution fails on a database. Defaults to 0 (no retry).

Delay between retries

Delay in seconds between retry attempts. Defaults to 0 (immediate retry).

Log output

Controls when node execution logs are retained:

  • Always – logs are kept for every execution
  • On failure or abort – logs are kept only when the execution fails or is aborted
  • Never – logs are discarded