Page History
Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Introduction
The JITL PLSQLJob provides PLSQLJob provides a parameterizable interface for executing Oracle® PL/SQL statements. The JS7 offers out-of-the-box capabilities
- to execute PL/SQL,
- to pass arguments to PL/SQL,
- to collect and to pass on the results of PL/SQL execution to next jobs,
- to use a JS7 - Credential Store.
The PLSQLJob can be used to execute files that include PL/SQL statements.
...
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 andcom.sos.jitl.jobs.db.oracle.PLSQLJob
Java class name.PLSQLJob
Java class name, then add arguments as explained from the below documentation.
Example
Download: dbPLSQLExecution.json
The following example shows a basic example use of the PLSQLJob. It executes PL/SQL anonymous code blocks - selecting the current system date and writing it to stdout.
...
Documentation
Job Documentation: https://www.sos-berlin.com/doc/JS7-JITL/PLSQLJob.xml
The PLSQLJob supports the following arguments:
Name | Purpose | Required | Default Value | Example |
---|---|---|---|---|
| PL/SQL statements to be executed | One of the arguments has to be specified |
| |
command_script_file | PL/SQL statements from a file | /home/sos/some_script.sql | ||
| JDBC connection string | Either a DB URL, location of a Hibernate configuration file or a Credential Store reference is used. User and password for database access can be specified by arguments with the same name and can be omitted if Oracle Wallet is used or can be specified with the Hibernate configuration file, from a Job Resource or from a Credential Store Reference. |
| |
| User name for database access | scott | ||
| Password for database access | tiger | ||
hibernate_configuration_file | Replaces db_url, db_user, db_password arguments from a hibernate configuration file. | ./config/private/hibernate.cfg.xml | ||
| Regular expression to parse output from the | false | ^SETs+(\\s)\\s*ISs(.*)$ | |
credential_store_file | Location of a credential store file (*.kdbx) | false | ./config/private/jobs.kdbx | |
credential_store_key | Location of a credential store file (*.key) | false | ./config/private/jobs.key |
...
- The
std_out_output
order variable contains the messages spooled to stdout by PL/SQL.
Further
...
Resources
...