JITL: The SOS Hibernate Managed Database Job
This job is introduced with Release 1.12 and replaces the deprecated JobSchedulerManagedDatabaseJob job. FEATURE AVAILABILITY STARTING FROM RELEASE 1.12
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:
- in the $SCHEDULER_DATA/jobs directory of a JobScheduler installation
- online under:
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
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
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
update MY_TABLE set a='foo' where b='bar';&#10;commit;