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 

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 and com.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.

...



Image Added

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

command

PL/SQL statements to be executed

One of the arguments has to be specified


SELECT SYSDATE FROM DUAL

command_script_filePL/SQL statements from a file
/home/sos/some_script.sql

db_url

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.


jdbc:oracle:thin:@localhost:1521:XE

db_user

User name for database access


scott

db_password

Password for database access


tiger
hibernate_configuration_fileReplaces db_url, db_user, db_password arguments from a hibernate configuration file.
./config/private/hibernate.cfg.xml

variable_parser_reg_expr

Regular expression to parse output from the DBMS_OUTPUT package and to set order variables for next jobs

false^SETs+(\\s)\\s*ISs(.*)$



credential_store_fileLocation of a credential store file (*.kdbx)false
./config/private/jobs.kdbx
credential_store_keyLocation 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

...