We are in the process of moving to Azure SQL Server from Oracle DB for our Spring Batch application.
I am getting the following error while trying to execute the job post migration to SQL Server
Could not increment identity; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'AppName.BATCH_JOB_SEQ'.
I can that SQL Server has the required sequence
Below the job repository configuration
<batch:job-repository id="jobRepository"
isolation-level-for-create="READ_COMMITTED"
table-prefix="MyApp.BATCH_"/>
Below are tables and sequences are available in Oracle
Below are tables and sequences are available in Azure SQL
I am using the following version
should I upgrade to
or should I recreate the tables as per https://github.com/spring-projects/spring-batch/blob/main/spring-batch-core/src/main/resources/org/springframework/batch/core/schema-sqlserver.sql