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

This job is used as a standalone solution or triggered by orders to execute (SQL-)statements in a database.
These can be database procedures or SQL statements.

...

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.

...

For other database management systems you have to modify the connection parameter like in the following examples:

  • MSSQLMS/SQL-Server
Code Block
 <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/job.xml job] title="Launch Database Statement" order="yes" stop_on_error="no">
     <description>
        <include file="jobs/JobSchedulerManagedDatabaseJob.xml"/>
    </description>
    <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/params.xml params]>
        <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/param.xml param ]name="db_class"        value="SOSMSSQLConnection"/>
        <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/param.xml param ]name="db_driver"       value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
        <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/param.xml param ]name="db_url"          value="jdbc:sqlserver://localhost:1433;sendStringParametersAsUnicode=false;selectMethod=cursor;databaseName=scheduler"/>
        <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/param.xml param ]name="db_user"         value="scheduler"/>
        <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/param.xml param ]name="db_password"     value="scheduler"/>
        <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/param.xml param ]name="command"         value=""/>
    </params>
    <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/script.xml script ]language="java" java_class="sos.scheduler.managed.JobSchedulerManagedDatabaseJob"/>
    <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/run_time.xml run_time]/>
 </job>

...

Code Block
 <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/job.xml job] title="Launch Database Statement" order="yes" stop_on_error="no">
     <description>
        <include file="jobs/JobSchedulerManagedDatabaseJob.xml"/>
    </description>
    <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/params.xml params]>
        <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/param.xml param ]name="db_class"        value="SOSPgSQLConnection"/>
        <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/param.xml param ]name="db_driver"       value="org.postgresql.Driver"/>
        <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/param.xml param ]name="db_url"          value="jdbc:postgresql://localhost:5432/scheduler"/>
        <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/param.xml param ]name="db_user"         value="scheduler"/>
        <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/param.xml param ]name="db_password"     value="scheduler"/>
        <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/param.xml param ]name="command"         value=""/>
    </params>
    <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/script.xml script ]language="java" java_class="sos.scheduler.managed.JobSchedulerManagedDatabaseJob"/>
    <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/run_time.xml run_time]/>
 </job>
  • IBM/DB2
Code Block
 <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/job.xml job] title="Launch Database Statement" order="yes" stop_on_error="no">
     <description>
        <include file="jobs/JobSchedulerManagedDatabaseJob.xml"/>
    </description>
    <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/params.xml params]>
        <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/param.xml param ]name="db_class"        value="SOSDB2Connection"/>
        <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/param.xml param ]name="db_driver"       value="com.ibm.db2.jcc.DB2Driver"/>
        <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/param.xml param ]name="db_url"          value="jdbc:db2://localhost:50000/scheduler:driverType=2;retrieveMessagesFromServerOnGetMessage=true;"/>
        <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/param.xml param ]name="db_user"         value="scheduler"/>
        <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/param.xml param ]name="db_password"     value="scheduler"/>
        <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/param.xml param ]name="command"         value=""/>
    </params>
    <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/script.xml script ]language="java" java_class="sos.scheduler.managed.JobSchedulerManagedDatabaseJob"/>
    <[http://www.sos-berlin.com/doc/en/scheduler.doc/xml/run_time.xml run_time]/>
 </job>