...
JITL: The Managed Database Job
Info | ||
---|---|---|
| ||
This job uses the deprecated sos.scheduler.managed.JobSchedulerManagedDatabaseJob that has been deprecated with Release 1.12. The JobSchedulerManagedDatabaseJobSOSHibernate job is provided as an alternative. |
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.
(A general overview of all JITL jobs can be found Features Library of Standard Jobs - JITL).
The description JobSchedulerManagedDatabaseJob.xml is stored in the ./jobs directory of the JobScheduler installation.
...
Code Block |
---|
<order title="update MY_TABLE"> <params> <param name="command" value="update MY_TABLE set a='foo' where b='bar';&#10;commit;"/> </params> <run_time/> </order> |
The job launchDB.job.xml (i.e. with a MySQL database connection, examples for other DBMS see below): It executes the statements where the statement in the order command parameter overwrites the statement in the job command parameter.
...
Code Block |
---|
<job title="Launch Database Statement" order="yes" stop_on_error="no">
<description>
<include file="jobs/JobSchedulerManagedDatabaseJob.xml"/>
</description>
<params>
<param name="db_class" value="SOSMySQLConnection"/>
<param name="db_driver" value="com.mysql.jdbc.Driver"/>
<param name="db_url" value="jdbc:mysql://localhost:3306/scheduler"/>
<param name="db_user" value="scheduler"/>
<param name="db_password" value="scheduler"/>
<param name="command" value=""/>
</params>
<script language="java" java_class="sos.scheduler.managed.JobSchedulerManagedDatabaseJob"/>
<run_time/>
</job>
|
...