Update SQLServer DDL script to use sequences instead of tables
Emulating sequences with tables causes deadlocks when running multiple jobs at the same time. Sequences have been supported in SQL Server since version 2012. This commit replaces the usage of tables to emulate sequences with real sequences. It also adds a new incrementer that is based on sequences instead of tables. Resolves #1448
This commit is contained in:
@@ -76,6 +76,6 @@ CREATE TABLE BATCH_JOB_EXECUTION_CONTEXT (
|
||||
references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID)
|
||||
) ;
|
||||
|
||||
CREATE TABLE BATCH_STEP_EXECUTION_SEQ (ID BIGINT IDENTITY);
|
||||
CREATE TABLE BATCH_JOB_EXECUTION_SEQ (ID BIGINT IDENTITY);
|
||||
CREATE TABLE BATCH_JOB_SEQ (ID BIGINT IDENTITY);
|
||||
CREATE SEQUENCE BATCH_STEP_EXECUTION_SEQ START WITH 0 MINVALUE 0 MAXVALUE 9223372036854775807 NO CACHE NO CYCLE;
|
||||
CREATE SEQUENCE BATCH_JOB_EXECUTION_SEQ START WITH 0 MINVALUE 0 MAXVALUE 9223372036854775807 NO CACHE NO CYCLE;
|
||||
CREATE SEQUENCE BATCH_JOB_SEQ START WITH 0 MINVALUE 0 MAXVALUE 9223372036854775807 NO CACHE NO CYCLE;
|
||||
|
||||
Reference in New Issue
Block a user