Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
outlinh1. true
outlinh1. true
1printablefalse
2stylh1. none
3indent20px

Introduction

This job The SQLExecutorJob template is used to execute SQL statements and SQL procedures in a database.

  • The job template makes use of JDBC connections and the Hibernate database access layer.
  • The job template can be used to access any database for which a JDBC Driver is available with the Agent.
    • The JS7 includes a number of JDBC Drivers for supported DBMS, see JS7 - Database.
    • For other DBMS you users can provide an individual JDBC Driver and store the Driver's .jar file with the ./lib/user_lib directory of the Agent installation.
  • The job templates template supports use of a JS7 - Credential Store
  • Delimitation
    • Consider that specific SQL language extensions such as e.g. Oracle® PL/SQL are not supported by Hibernate.
    • For Oracle® PL/SQL use the JS7 - JITL PLSQLJob
    • For Oracle® SQL*Plus use the JS7 - JITL SQLPLUSJob

...

When defining the job consider

  • to invoke the Wizard that is available from the job properties tab in the Configuration view and to select the JITL job class and SQLExecutorJob and respective arguments from the Wizard

or

  • to specify the JITL job class and com.sos.jitl.jobs.db.SQLExecutorJob Java class name, then add arguments as explained from the below documentation.



The job's arguments can be specified as follows:


...

Documentation

Job Documentation: https://www.sos-berlin.com/doc/JS7-JITL/SQLExecutorJob.xml

The com.sos.jitl.jobs.db.SQLExecutorJob class accepts the following arguments:

...

  • Note that it is possible to define more than one instruction with the command argument.
    Such instructions are then carried out in the order in which they are written and must be separated by a semicolon.
    • Some DBMS might require an additional newline character.
    • For example
      • update MY_TABLE set a='foo' where b='bar'; commit;
  • Note that order variables and arguments can be injected to the SQL statement(s) of the command argument by use of the ${variable} syntax.
  • For use of the credential_store_* arguments see JS7 - Use of Credential Store with JITL Jobs.

Example

Download: 

A FileNotExistsJob configuration can look like this:

Further Resources

...