ReplicaDB icon indicating copy to clipboard operation
ReplicaDB copied to clipboard

MSSQL specify number of jobs - Error

Open MichalisDBA opened this issue 1 year ago • 0 comments

Hi @osalvador.

When you specify number of jobs for source Microsoft SQL Server, for example jobs=2, ReplicaDB throws an error

Incorrect syntax near 'ABS'.

I think you missed an AND on file SQLServerManager.java line 383.

Instead of

sqlCmd = sqlCmd + " where " + options.getSourceWhere() + " ABS(CHECKSUM(%% physloc %%)) % " + (options.getJobs()) + " = ?";

i believe must be

sqlCmd = sqlCmd + " where " + options.getSourceWhere() + " AND ABS(CHECKSUM(%% physloc %%)) % " + (options.getJobs()) + " = ?";

MichalisDBA avatar Apr 25 '24 08:04 MichalisDBA