石英scheduler2.2。创建sqlserver数据库模式?

时间:2022-07-17 02:11:57

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.

我是石英的新手。我已经用RAM jobstore做了一些示例。之后,我尝试为JDBC jobstore做smaples。我将SQL server作为数据库。

In my quartz.properties,

在我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 .

但是我没有quartz的数据库结构。我在谷歌中搜索了很多,找到了SQL SERVER的查询来创建QUARTZ数据库模式。

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

但是我只找到了这个链接。http://quartz-调度。org/documentation/quartz- 2.x/migrationguide。

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

请帮助我为quartz 2.2.1创建一个新的数据库模式。谢谢。

4 个解决方案

#1


4  

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.

对于每个quartz版本,每个支持的数据库都有单独的模式。您可以在这里选择quartz版本,然后导航到distribution/src/main/assembly/root/docs/dbTables/对于相应的quartz版本,U可以获得所有支持的数据库的模式。

#2


3  

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

我已经在Quartz发行版的docs/dbTables目录中获得了sqlserver数据库模式查询。

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

款链接:http://quartz-scheduler.org/generated/2.2.1/html/qs-all/页面/ Quartz_Scheduler_Documentation_Set % 2 fco-jstr_jdbcjobstore.html % 23

#3


1  

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

我们来看看这个:http://teknosrc.com/how-setup- quartz-er -server- mysql-database/ ?

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

您需要下载quartz发行版,您将发现大多数数据库的模式。

#4


1  

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

对于Quartz 2.3.0或更高版本,以上的解决方案都不适合我。

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:

您需要到GitHub repo中的发布部分,下载可分发的文件(tar)。提取它并为您的RDBMS找到合适的.sql文件:

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

石英核心/org/quartz/impl/jdbcjobstore/ / src / main /资源

(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.

例如,如果有人想要为最近的MySQL版本生成Quartz DB模式,他们必须对使用大表mysql_innodb感兴趣。sql代替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;

#1


4  

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.

对于每个quartz版本,每个支持的数据库都有单独的模式。您可以在这里选择quartz版本,然后导航到distribution/src/main/assembly/root/docs/dbTables/对于相应的quartz版本,U可以获得所有支持的数据库的模式。

#2


3  

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

我已经在Quartz发行版的docs/dbTables目录中获得了sqlserver数据库模式查询。

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

款链接:http://quartz-scheduler.org/generated/2.2.1/html/qs-all/页面/ Quartz_Scheduler_Documentation_Set % 2 fco-jstr_jdbcjobstore.html % 23

#3


1  

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

我们来看看这个:http://teknosrc.com/how-setup- quartz-er -server- mysql-database/ ?

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

您需要下载quartz发行版,您将发现大多数数据库的模式。

#4


1  

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

对于Quartz 2.3.0或更高版本,以上的解决方案都不适合我。

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:

您需要到GitHub repo中的发布部分,下载可分发的文件(tar)。提取它并为您的RDBMS找到合适的.sql文件:

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

石英核心/org/quartz/impl/jdbcjobstore/ / src / main /资源

(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.

例如,如果有人想要为最近的MySQL版本生成Quartz DB模式,他们必须对使用大表mysql_innodb感兴趣。sql代替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;