Skip to end of metadata
Go to start of metadata

JITL: The SOS Hibernate Managed Database Job


This job is introduced with Release 1.12 and provided as an alternative to the JobSchedulerManagedDatabaseJob job which uses a deprecated Java class. 

This job is used to execute (SQL-)statements in a database and can be used standalone or triggered by orders - i.e. as an order job.
It can execute database procedures or SQL statements.

This job uses the SOSHibernate connection class (com.sos.jitl.managed.job.ManagedDatabaseJobJSAdapterClass) whereas the Managed Database Job used the deprecated SOSConnection classes.

(A general overview of all JITL jobs can be found Library of Standard Jobs - JITL).

The documentation of the JobSchedulerManagedDatabaseJobSOSHibernate.xml job can be found:

The JobSchedulerManagedDatabaseJobSOSHibernate.xml job uses different parameters to the JobSchedulerManagedDatabaseJob.xml job.


The JobSchedulerManagedDatabaseJobSOSHibernate.xml job accepts up to 5 parameters:

  • hibernate_configuration_file (required) - specifies the database connection file
  • command (optional) - contains the SQL instructions
  • resultset_as_warning (optional)
  • exec_returns_resultset (optional)
  • resultset_as_parameters (optional)

The following screenshot shows a simple example where the JobSchedulerManagedDatabaseJobSOSHibernate.xml job is part of a job chain.

In the above configuration the resultset_as_warning parameter is set to true to ensure that the result is written to the log file. The log file would then appear as shown in the following listing

Example Log output with SQL query result as warning  Expand source

Note that it is possible to define more than one instruction in the command parameter.
Such instructions are then carried out in the order in which they are written and must be separated by a semicolon and a subsequent new line.

You can use 
 as newline.

For example

  • update MY_TABLE set a='foo' where b='bar';

Note also that Order parameters could be used to overwrite the Job parameters shown in the example above.

Further information