Question

I spent the better part of the day trying to get Quartz.net to run in an Azure worker role. It uses an SQL Azure instance as its persistent store.

The configuration I've got is this the following:

quartz.jobStore.type=Quartz.Impl.AdoJobStore.JobStoreTX, Quartz
quartz.jobStore.driverDelegateType=Quartz.Impl.AdoJobStore.SqlServerDelegate, Quartz
quartz.jobStore.tablePrefix=QRTZ_
quartz.jobStore.dataSource=myDS
quartz.dataSource.myDS.connectionString=Server=xxx,1433;Database=xxx;User ID=xxx@xxx;Password=xxx;Trusted_Connection=False;Encrypt=True;Connection Timeout=30;
quartz.dataSource.myDS.provider=SqlServer-20

To create the schema, I used the scripts that came in the Quartz.net zip file. Actually, I tried two of them:

  1. tables_sqlServer.sql,
  2. tables_sqlServerCe.sql

They were in the Quartz.NET-2.2.1.zip I downloaded. I had to remove ON [PRIMARY] in the ALTER TABLE statements of the first script in order to get it to work; otherwise it complained about 'Filegroup reference and partitioning scheme' is not supported in this version of SQL Server.'

The second one worked without modifications.

Whichever script I use to create the schema, Quartz.net throws an error when I try to delete a job:

"Couldn't remove trigger: Tables without a clustered index are not supported in this version of SQL Server. Please create a clustered index and try again."

I'm able to add jobs (I can see the rows being added to the DB) but whenever I try to delete one, Quartz.net throws a fit.

What can I do to fix this?

Thanks!

Was it helpful?

Solution

I've updated and ran smoke tests for script alterations that should make it work on SQL Azure, the latest script is available here:

https://raw.github.com/quartznet/quartznet/master/database/tables/tables_sqlServer.sql

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top