If you want to change the database for the JobScheduler then follow these steps:

  • Create the new database
  • Stop the JobScheduler
  • Configure the new database connection data in the following files:
    • ./config/factory.ini (For JobScheduler tables like SCHEDULER_HISTORY. See factory.ini)
    • ./config/hibernate.cfg.xml (Used by JID and some JITL jobs)
    • ./config/reporting.hibernate.cfg.xml (Used by JOC; with release >= 1.11.0)
    • ./config/sos_settings.ini (Used by the script ./install/scheduler_install_tables.(sh|cmd) and some JITL jobs; with release < 1.11.0)
  • Call the script ./install/scheduler_install_tables.sh (for Unix) or ./install/scheduler_install_tables.cmd (for Windows).

    • This script executes the sql files in ./db/[dbms]/ to create the database tables.

  • Start the JobScheduler

Examples for the Configuration of factory.ini, hibernate.cfg.xml and sos_settings.ini

MySQL

factory.ini:

 [spooler]
 ...
 db                     = jdbc -class=com.mysql.jdbc.Driver jdbc:mysql://localhost:3306/scheduler -user=scheduler -password=scheduler
 db_class               = SOSMySQLConnection
 ...

hibernate.cfg.xml and reporting.hibernate.cfg.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
                                         "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
 <session-factory>
  <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
  <property name="hibernate.connection.password">scheduler</property>
  <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/scheduler</property>
  <property name="hibernate.connection.username">scheduler</property>
  <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
  <property name="hibernate.show_sql">false</property>
  <property name="hibernate.connection.autocommit">false</property>
  <property name="hibernate.format_sql">true</property>
  <property name="hibernate.temp.use_jdbc_metadata_defaults">false</property>
 </session-factory>
</hibernate-configuration>

sos_settings.ini:

 [configuration]
 class         = SOSMySQLConnection
 driver        = com.mysql.jdbc.Driver
 url           = jdbc:mysql://localhost:3306/scheduler
 user          = scheduler
 password      = scheduler
 compatibility = normal

MySQL via MariaDB

factory.ini:

 [spooler]
 ...
 db                     = jdbc -class=org.mariadb.jdbc.Driver jdbc:mysql://localhost:3306/scheduler -user=scheduler -password=scheduler
 db_class               = SOSMySQLConnection
 ...

hibernate.cfg.xml and reporting.hibernate.cfg.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
                                         "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
 <session-factory>
  <property name="hibernate.connection.driver_class">org.mariadb.jdbc.Driver</property>
  <property name="hibernate.connection.password">scheduler</property>
  <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/scheduler</property>
  <property name="hibernate.connection.username">scheduler</property>
  <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
  <property name="hibernate.show_sql">false</property>
  <property name="hibernate.connection.autocommit">false</property>
  <property name="hibernate.format_sql">true</property>
  <property name="hibernate.temp.use_jdbc_metadata_defaults">false</property>
 </session-factory>
</hibernate-configuration>

sos_settings.ini:

 [configuration]
 class         = SOSMySQLConnection
 driver        = org.mariadb.jdbc.Driver
 url           = jdbc:mysql://localhost:3306/scheduler
 user          = scheduler
 password      = scheduler
 compatibility = normal

Oracle

factory.ini:

 [spooler]
 ...
 db                     = jdbc -class=oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@localhost:1521:scheduler -user=scheduler -password=scheduler
 db_class               = SOSOracleConnection
 ...

hibernate.cfg.xml and reporting.hibernate.cfg.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
                                         "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
 <session-factory>
  <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
  <property name="hibernate.connection.password">scheduler</property>
  <property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:scheduler</property>
  <property name="hibernate.connection.username">scheduler</property>
  <property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
  <property name="hibernate.show_sql">false</property>
  <property name="hibernate.connection.autocommit">false</property>
  <property name="hibernate.format_sql">true</property>
  <property name="hibernate.temp.use_jdbc_metadata_defaults">false</property>
 </session-factory>
</hibernate-configuration>

sos_settings.ini:

 [configuration]
 class         = SOSOracleConnection
 driver        = oracle.jdbc.driver.OracleDriver
 url           = jdbc:oracle:thin:@localhost:1521:scheduler
 user          = scheduler
 password      = scheduler
 compatibility = normal

Microsoft SQL Server

factory.ini:

 [spooler]
 ...
 db                     = jdbc -class=com.microsoft.sqlserver.jdbc.SQLServerDriver jdbc:sqlserver://localhost:1433;sendStringParametersAsUnicode=false;selectMethod=cursor;databaseName=scheduler -user=scheduler -password=scheduler
 db_class               = SOSMSSQLConnection
 ...

hibernate.cfg.xml and reporting.hibernate.cfg.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
                                         "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
 <session-factory>
  <property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>
  <property name="hibernate.connection.password">scheduler</property>
  <property name="hibernate.connection.url">jdbc:sqlserver://localhost:1433;sendStringParametersAsUnicode=false;selectMethod=cursor;databaseName=scheduler</property>
  <property name="hibernate.connection.username">scheduler</property>
  <property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
  <property name="hibernate.show_sql">false</property>
  <property name="hibernate.connection.autocommit">false</property>
  <property name="hibernate.format_sql">true</property>
  <property name="hibernate.temp.use_jdbc_metadata_defaults">false</property>
 </session-factory>
</hibernate-configuration>

sos_settings.ini:

 [configuration]
 class         = SOSMSSQLConnection
 driver        = com.microsoft.sqlserver.jdbc.SQLServerDriver
 url           = jdbc:sqlserver://localhost:1433;sendStringParametersAsUnicode=false;selectMethod=cursor;databaseName=scheduler
 user          = scheduler
 password      = scheduler
 compatibility = normal

Microsoft SQL Server via jTDS

factory.ini:

 [spooler]
 ...
 db                     = jdbc -class=net.sourceforge.jtds.jdbc.Driver jdbc:jtds:sqlserver://localhost:1433;sendStringParametersAsUnicode=false;selectMethod=cursor;databaseName=scheduler -user=scheduler -password=scheduler
 db_class               = SOSMSSQLConnection
 ...

hibernate.cfg.xml and reporting.hibernate.cfg.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
                                         "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
 <session-factory>
  <property name="hibernate.connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
  <property name="hibernate.connection.password">scheduler</property>
  <property name="hibernate.connection.url">jdbc:jtds:sqlserver://localhost:1433;sendStringParametersAsUnicode=false;selectMethod=cursor;databaseName=scheduler</property>
  <property name="hibernate.connection.username">scheduler</property>
  <property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
  <property name="hibernate.show_sql">false</property>
  <property name="hibernate.connection.autocommit">false</property>
  <property name="hibernate.format_sql">true</property>
  <property name="hibernate.temp.use_jdbc_metadata_defaults">false</property>
 </session-factory>
</hibernate-configuration>

sos_settings.ini:

 [configuration]
 class         = SOSMSSQLConnection
 driver        = net.sourceforge.jtds.jdbc.Driver
 url           = jdbc:jtds:sqlserver://localhost:1433;sendStringParametersAsUnicode=false;selectMethod=cursor;databaseName=scheduler
 user          = scheduler
 password      = scheduler
 compatibility = normal

PostgreSQL

factory.ini:

 [spooler]
 ...
 db                     = jdbc -class=org.postgresql.Driver jdbc:postgresql://localhost:5432/scheduler -user=scheduler -password=scheduler
 db_class               = SOSPgSQLConnection
 ...

hibernate.cfg.xml and reporting.hibernate.cfg.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
                                         "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
 <session-factory>
  <property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
  <property name="hibernate.connection.password">scheduler</property>
  <property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/scheduler</property>
  <property name="hibernate.connection.username">scheduler</property>
  <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
  <property name="hibernate.show_sql">false</property>
  <property name="hibernate.connection.autocommit">false</property>
  <property name="hibernate.format_sql">true</property>
  <property name="hibernate.temp.use_jdbc_metadata_defaults">false</property>
 </session-factory>
</hibernate-configuration>

sos_settings.ini:

 [configuration]
 class         = SOSPgSQLConnection
 driver        = org.postgresql.Driver
 url           = jdbc:postgresql://localhost:5432/scheduler
 user          = scheduler
 password      = scheduler
 compatibility = normal

DB2

factory.ini:

 [spooler]
 ...
 db                     = jdbc -class=com.ibm.db2.jcc.DB2Driver jdbc:db2://localhost:50000/scheduler:driverType=2;retrieveMessagesFromServerOnGetMessage=true; -user=scheduler -password=scheduler
 db_class               = SOSDB2Connection
 ...

hibernate.cfg.xml and reporting.hibernate.cfg.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
                                         "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
 <session-factory>
  <property name="hibernate.connection.driver_class">com.ibm.db2.jcc.DB2Driver</property>
  <property name="hibernate.connection.password">scheduler</property>
  <property name="hibernate.connection.url">jdbc:db2://localhost:50000/scheduler:driverType=2;retrieveMessagesFromServerOnGetMessage=true;</property>
  <property name="hibernate.connection.username">scheduler</property>
  <property name="hibernate.dialect">org.hibernate.dialect.DB2Dialect</property>
  <property name="hibernate.show_sql">false</property>
  <property name="hibernate.connection.autocommit">false</property>
  <property name="hibernate.format_sql">true</property>
  <property name="hibernate.temp.use_jdbc_metadata_defaults">false</property>
 </session-factory>
</hibernate-configuration>

sos_settings.ini:

 [configuration]
 class         = SOSDB2Connection
 driver        = com.ibm.db2.jcc.DB2Driver
 url           = jdbc:db2://localhost:50000/scheduler:driverType=2;retrieveMessagesFromServerOnGetMessage=true;
 user          = scheduler
 password      = scheduler
 compatibility = normal

Sybase

factory.ini:

 [spooler]
 ...
 db                     = jdbc -class=com.sybase.jdbc3.jdbc.SybDriver jdbc:sybase:Tds:localhost:5000/scheduler -user=scheduler -password=scheduler
 db_class               = SOSSybaseConnection
 ...

hibernate.cfg.xml and reporting.hibernate.cfg.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
                                         "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
 <session-factory>
  <property name="hibernate.connection.driver_class">com.sybase.jdbc3.jdbc.SybDriver</property>
  <property name="hibernate.connection.password">scheduler</property>
  <property name="hibernate.connection.url">jdbc:sybase:Tds:localhost:5000/scheduler</property>
  <property name="hibernate.connection.username">scheduler</property>
  <property name="hibernate.dialect">org.hibernate.dialect.SybaseDialect</property>
  <property name="hibernate.show_sql">false</property>
  <property name="hibernate.connection.autocommit">false</property>
  <property name="hibernate.format_sql">true</property>
  <property name="hibernate.temp.use_jdbc_metadata_defaults">false</property>
 </session-factory>
</hibernate-configuration>

sos_settings.ini:

 [configuration]
 class         = SOSSybaseConnection
 driver        = com.sybase.jdbc3.jdbc.SybDriver
 url           = jdbc:sybase:Tds:localhost:5000/scheduler
 user          = scheduler
 password      = scheduler
 compatibility = normal

Sybase via jTDS

factory.ini:

 [spooler]
 ...
 db                     = jdbc -class=net.sourceforge.jtds.jdbc.Driver jdbc:jtds:sybase://localhost:5000/scheduler -user=scheduler -password=scheduler
 db_class               = SOSSybaseConnection
 ...

hibernate.cfg.xml and reporting.hibernate.cfg.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
                                         "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
 <session-factory>
  <property name="hibernate.connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
  <property name="hibernate.connection.password">scheduler</property>
  <property name="hibernate.connection.url">jdbc:jtds:sybase://localhost:5000/scheduler</property>
  <property name="hibernate.connection.username">scheduler</property>
  <property name="hibernate.dialect">org.hibernate.dialect.SybaseDialect</property>
  <property name="hibernate.show_sql">false</property>
  <property name="hibernate.connection.autocommit">false</property>
  <property name="hibernate.format_sql">true</property>
  <property name="hibernate.temp.use_jdbc_metadata_defaults">false</property>
 </session-factory>
</hibernate-configuration>

sos_settings.ini:

 [configuration]
 class         = SOSSybaseConnection
 driver        = net.sourceforge.jtds.jdbc.Driver
 url           = jdbc:jtds:sybase://localhost:5000/scheduler
 user          = scheduler
 password      = scheduler
 compatibility = normal

Firebird

factory.ini:

 [spooler]
 ...
 db                     = jdbc -class=org.firebirdsql.jdbc.FBDriver jdbc:firebirdsql://localhost:3050/scheduler -user=scheduler -password=scheduler
 db_class               = SOSFbSQLConnection
 ...

hibernate.cfg.xml and reporting.hibernate.cfg.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
                                         "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
 <session-factory>
  <property name="hibernate.connection.driver_class">org.firebirdsql.jdbc.FBDriver</property>
  <property name="hibernate.connection.password">scheduler</property>
  <property name="hibernate.connection.url">jdbc:firebirdsql://localhost:3050/scheduler</property>
  <property name="hibernate.connection.username">scheduler</property>
  <property name="hibernate.dialect">org.hibernate.dialect.FirebirdDialect</property>
  <property name="hibernate.show_sql">false</property>
  <property name="hibernate.connection.autocommit">false</property>
  <property name="hibernate.format_sql">true</property>
  <property name="hibernate.temp.use_jdbc_metadata_defaults">false</property>
 </session-factory>
</hibernate-configuration>

sos_settings.ini:

 [configuration]
 class         = SOSFbSQLConnection
 driver        = org.firebirdsql.jdbc.FBDriver
 url           = jdbc:firebirdsql://localhost:3050/scheduler
 user          = scheduler
 password      = scheduler
 compatibility = normal