Forums » Toad for SQL Server General

Thread: Error on compare and sync data

This question is answered. Helpful answers available: 2. Answered answers available: 1.


Permlink Replies: 8 - Pages: 1 - Last Post: Jun 9, 2012 12:24 PM by: s.bertolotti
sergio_b

Posts: 38
Registered: 4/5/12
Error on compare and sync data
Posted: May 5, 2012 5:15 AM
 
  Click to reply to this thread Reply

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 <link> - 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





Valentine


Posts: 437
Registered: 12/7/06
Re: Error on compare and sync data
Posted: May 5, 2012 6:43 AM   in response to: sergio_b
 
  Click to reply to this thread Reply

Sergio,

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

Regards, Valentine /R&D @ DELL
sergio_b

Posts: 38
Registered: 4/5/12
Re: Error on compare and sync data
Posted: May 5, 2012 7:00 AM   in response to: sergio_b
 
  Click to reply to this thread Reply

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



Valentine


Posts: 437
Registered: 12/7/06
Re: Error on compare and sync data
Posted: May 5, 2012 11:46 AM   in response to: sergio_b
 
  Click to reply to this thread Reply

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

Regards, Valentine /R&D @ DELL
sergio_b

Posts: 38
Registered: 4/5/12
Re: Error on compare and sync data
Posted: May 5, 2012 12:19 PM   in response to: sergio_b
 
  Click to reply to this thread Reply

Dear Valentine,
done.

I send to you e-mail with script.

SYNCFIELD is timestamp field.

Best regards.

Sergio Bertolotti



Alexander.Maximov

Posts: 794
Registered: 6/16/10
Re: Error on compare and sync data
Posted: May 12, 2012 4:16 AM   in response to: sergio_b
 
  Click to reply to this thread Reply

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.



Alexander Maximov, DELL
sergio_b

Posts: 38
Registered: 4/5/12
Re: Error on compare and sync data
Posted: May 12, 2012 5:36 AM   in response to: sergio_b
 
  Click to reply to this thread Reply

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



Stanislav

Posts: 51
Registered: 6/16/11
Re: Error on compare and sync data
Posted: Jun 9, 2012 9:09 AM   in response to: sergio_b
 
  Click to reply to this thread Reply

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!


Regards, Stanislav | R&D • Quest Software (now part of DELL)
s.bertolotti

Posts: 249
Registered: 5/14/12
Re: Error on compare and sync data
Posted: Jun 9, 2012 12:24 PM   in response to: sergio_b
 
  Click to reply to this thread Reply

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



Legend
Guru: 2001 + pts
Expert: 751 - 2000 pts
Enthusiast: 31 - 750 pts
Novice: 0 - 30 pts
Moderators
Helpful answer (5 pts)
Answered (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums