java 石英 scheduler2.2.x 创建 sqlserver 数据库架构?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/29387264/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
quartz scheduler2.2.x creating sqlserver database schema?
提问by Human Being
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 服务器作为我的数据库。
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 .
但我没有石英的数据库结构。我在 google 中搜索了很多,以找到 SQL SERVER 的查询来创建 QUARTZ 数据库模式。
But I found this link only.http://quartz-scheduler.org/documentation/quartz-2.x/migration-guide.
但我只找到了这个链接。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.
请帮我为quartz 2.2.1 创建一个新的数据库模式。谢谢。
回答by Clint Eastwood
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 存储库中的发布部分,下载可分发文件(一个tar.gz
文件),将其解压缩并在以下位置找到适合.sql
您的 RDBMS 的文件:
quartz-core/src/main/resources/org/quartz/impl/jdbcjobstore/
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
.
(奖励)例如,如果有人想为最新版本的MySQL生成 Quartz DB 模式,他们必须有兴趣使用tables_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;
回答by nav3916872
For every quartz version there is separate schema for each of the supported databases. U can select the quartz version hereand 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版本,然后导航到distribution/src/main/assembly/root/docs/dbTables/对应的quartz版本,你可以获得所有支持数据库的模式。
回答by Human Being
I have got the sqlserverdatabase schema queries in the docs/dbTablesdirectory of the Quartz distribution.
我在 Quartz 发行版的docs/dbTables目录中有sqlserver数据库模式查询。
Here u can find all the database queries.
在这里你可以找到所有的数据库查询。
参考链接:http ://quartz-scheduler.org/generated/2.2.1/html/qs-all/#page/Quartz_Scheduler_Documentation_Set%2Fco-jstr_jdbcjobstore.html%23
回答by Yoav A
have a look at this: http://teknosrc.com/how-setup-quartz-scheduler-server-with-mysql-database/
看看这个: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.
你需要下载quartz发行版,你会发现大多数数据库的模式。