quartz scheduler2.2.x创建sqlserver数据库架构?

Hum*_*ing 2 java database sql-server scheduler quartz-scheduler

我是Quartz的新手.我已经用RAM jobstore做了一些示例.之后我试图为JDBC jobstore做一些事情.我有SQL服务器作为我的数据库.

在我的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  
Run Code Online (Sandbox Code Playgroud)

但我没有石英的数据库结构.我在谷歌搜索了很多,以查找SQL SERVER的查询来创建QUARTZ数据库模式.

但我发现这个链接只是.http://quartz-scheduler.org/documentation/quartz-2.x/migration-guide .

请帮我创建一个新的数据库模式到quartz 2.2.1.谢谢.

Cli*_*ood 8

对于Quartz 2.3.0或更高版本,上述解决方案均不适用于我.

您需要转到GitHub仓库中版本部分,下载可分发文件(tar.gz文件),解压缩并找到适合.sql您的RDBMS的文件:

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

(Bonus)例如,如果有人想为最新版本的MySQL生成Quartz DB模式,他们必须有兴趣使用tables_mysql_innodb.sql而不是tables_mysql.sql.

编辑: 您可能还想要添加以下内容:

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

USE quartz;
Run Code Online (Sandbox Code Playgroud)


nav*_*872 5

对于每个石英版本,每个支持的数据库都有单独的模式.您可以在此处选择石英版本,然后导航到distribution/src/main/assembly/root/docs/dbTables /以获取相应的石英版本,您可以获取所有支持的数据库的架构.