Versions Compared

Key

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

...

The PLSQLJob can be used to execute files that include PL/SQL statements.

Usage

When defining the job consider

  • to select the JITL job class and
  • to specify the com.sos.jitl.jobs.db.oracle.PLSQLJob Java class name.

The following example shows a basic example of the PLSQLJob. It executes PL/SQL anonymous code blocks - selecting the current system date and writing it to stdout.

...

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 or , 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


For use of the credential_store_* arguments see JS7 - Use of Credential Store with JITL Jobs.

Argument: command

PL/SQL code can be specified as the value of the command argument:

...

Further References