Toad World® Forums

Error on compare and sync data

I use your last version 5.6.0.568 trial and I test functionality to compare and sync data.
I have a problem.
I compare two DB’s. The DB’s are identical at level of structure/metadata.
Changes only datas.
I compare they without problems and generate the script to insert/update datas in the second DB.
As you can see by the screenshot in attach I set - Ignore BLOBS and TIMESTAMP columns.

When I try to execute the script SQL to sync data I obtain an error messages.

Category Timestamp Duration Message Line Position
Error 05/05/2012 13.44.13 0:00:00.358 - SQL Server Database Error: Sintassi non corretta in prossimità di ‘,’. 18 0.

In attach you find the script of comparison in 7z format.

The line with the problem is number 18. There is a double , instead a vlue.

I stay tune for your answer.

Best regards.

Sergio Bertolotti

insert_update.7z (72.2 KB)

settings_comparison.jpeg

Sergio,

can you please share DDL script of this table [dbo].[ANAGRAFICA_MACCHINE]
thanks!

Valentine,
can you send me your e-mail address. I send DDL script of the table to your e-mail addrees.

Best regards.

Sergio Bertolotti

Sergio,

my e-mail is valentin (dot) baev (at) quest (dot) com
also please tell me what values are in the field SYNCFIELD
many thanks in advance

Dear Valentine,
done.

I send to you e-mail with script.

SYNCFIELD is timestamp field.

Best regards.

Sergio Bertolotti

Hi Sergio,
we will bring a similar option to ignore timestamp columns in sync script. Not sure it will be implemented in upcoming release though.

As a workaround for right now please exclude columns from the comparison at all and you should get correct script since it will not contain these columns.

Dear Alexander,

many thank’s for your support.

For now I exclude comuns with timestamp fields from comparison, but I hope to see this prpblem will be solve in the future.

Best regards.

Sergio Bertolotti

Sergio,

Just want to let you know that we decided to fix it without adding an additional option as SqlServer does not allow any modifications of timestamp column anyway. Thus now timestamp column will be always excluded from synchronization script.

If it’s interesting for you, here is some background. The behavior to make script that can’t be executed was made intentionally some time ago; the idea was to let user see that it’s not possible to make data in tables with timestamp column to be exactly the same. But now we see that it’s not very useful while user have to manually exclude such columns what is not convenient and may be time consuming.
Also we decided not to add an option as it may confuse users because purpose of having script that can’t be executed is not obvious.

As you may have seen the fix already presents in 577 beta. Just let us know if you have any questions.

Thank you for participation!

Stanislav,

I try to test the problem with the new last beta version 577.

I see how timestamp field will be bypass with the correct comment about the type timestamp.

For example :

– NOTE: Table ANAGRAFICA_ALBERGHI contains column of timestamp (rowversion) datatype.
– While SQL Server does not allow explicit modification of timestamp values
– this column is omitted in the script, its values are automatically generated by the server.

This is a piece of script that I send to you previously.

I understand your position and I agree with you.
For me this fix is OK.

Best regards.

Sergio Bertolotti