Hi everyone,
I recently started using Quartz.NET and I'm trying to add clustering support to the application I am working on.
I'm using SQL Server 2014 for the database.
When I set 'cluster = true' in the configuration and run the application, it immediately crashes with the following exception:
Quartz.Impl.AdoJobStore.LockException: Failure obtaining db row lock: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR. ---> System.Data.SqlClient.SqlException: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR.
With 'cluster=false' it works fine, so accessing the database is not the problem.
Here is the configuration I have for Quartz.NET:
NameValueCollection props = new NameValueCollection
{
{ "quartz.serializer.type", "binary" },
{ "quartz.scheduler.instanceId", "AUTO" },
{ "quartz.jobStore.clustered", "true" },
{ "quartz.jobStore.type", "Quartz.Impl.AdoJobStore.JobStoreTX, Quartz" },
{ "quartz.jobStore.driverDelegateType", "Quartz.Impl.AdoJobStore.StdAdoDelegate, Quartz" },
{ "quartz.jobStore.tablePrefix", "QRTZ_" },
{ "quartz.dataSource.myDS.connectionString", "[my connection string]" },
{ "quartz.dataSource.myDS.provider", "SqlServer" },
{ "quartz.jobStore.dataSource", "myDS" },
};
I'm probably missing something obvious, but I spent a few hours trying to find what I'm doing wrong without much success.
Any help would be appreciated.