quartz scheduler2.2.x creating sqlserver database schema?

11,944

Solution 1

For Quartz 2.3.0 or greater, none of the solutions above worked for me.

You need to go to the releases section in their GitHub repo, download the distributable file (a tar.gz file), extract it and find the appropriate .sql file for your RDBMS, within:

quartz-core/src/main/resources/org/quartz/impl/jdbcjobstore/

(Bonus) For example, if someone wants to generate the Quartz DB schema for a recent version of MySQL, they must be interested in using tables_mysql_innodb.sql instead of tables_mysql.sql.

Edit: You might want to also prepend the following:

CREATE DATABASE IF NOT EXISTS `quartz`
  DEFAULT CHARACTER SET utf8mb4
  DEFAULT COLLATE utf8mb4_unicode_ci;

USE quartz;

Solution 2

For every quartz version there is separate schema for each of the supported databases. U can select the quartz version here and then navigate to distribution/src/main/assembly/root/docs/dbTables/ for the corresponding quartz version and u can get the schema for all supported databases.

Solution 3

I have got the sqlserver database schema queries in the docs/dbTables directory of the Quartz distribution.

Here u can find all the database queries.

Referal Link : http://quartz-scheduler.org/generated/2.2.1/html/qs-all/#page/Quartz_Scheduler_Documentation_Set%2Fco-jstr_jdbcjobstore.html%23

Solution 4

have a look at this: http://teknosrc.com/how-setup-quartz-scheduler-server-with-mysql-database/

you need to download quartz distribution, you'll find schema fo most data bases.

Share:
11,944
Human Being
Author by

Human Being

Always willing to learn the new things to enhance my knowledge .

Updated on July 14, 2022

Comments

  • Human Being
    Human Being almost 2 years

    I am new to Quartz. I have done some sample with RAM jobstore . After that I am trying to do smaples for JDBC jobstore . I am having SQL server as my database.

    In my quartz.properties,

    org.quartz.scheduler.skipUpdateCheck: true  
    
    org.quartz.scheduler.instanceName =OZS_SCHEDULAR  
    org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool  
    org.quartz.threadPool.threadCount = 4  
    org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true  
    org.quartz.threadPool.threadPriority = 5  
    
    
    #specify the jobstore used  
    org.quartz.jobStore.misfireThreshold = 60000  
    org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX  
    org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate  
    org.quartz.jobStore.useProperties = false  
    
    
    #The datasource for the jobstore that is to be used  
    org.quartz.jobStore.dataSource = myDS  
    
    #quartz table prefixes in the database  
    org.quartz.jobStore.tablePrefix = WB_QRTZ_  
    org.quartz.jobStore.misfireThreshold = 60000  
    org.quartz.jobStore.isClustered = false  
    
    #The details of the datasource specified previously  
    org.quartz.dataSource.myDS.driver =net.sourceforge.jtds.jdbc.Driver  
    org.quartz.dataSource.myDS.URL =jdbc:jtds:sqlserver://192.160.100.24:1433;databaseName=Test  
    org.quartz.dataSource.myDS.user =admin  
    org.quartz.dataSource.myDS.password = password
    org.quartz.dataSource.myDS.maxConnections = 20  
    
    
    org.quartz.jobStore.isClustered = false  
    org.quartz.jobStore.clusterCheckinInterval = 20000  
    
    org.quartz.scheduler.instanceId = AUTO  
    

    But I don't have the database structure for quartz. I have searched a lot in google to find the queries of SQL SERVER to create QUARTZ database schema .

    But I found this link only.http://quartz-scheduler.org/documentation/quartz-2.x/migration-guide .

    Please help me to create a new database schema to quartz 2.2.1. Thanks.