Index formatting in script confuses comparisons for version control

In a previous job where I used Microsoft's SSDT for version control and schema compare, I could modify a table definition to add an index. In the process, I could format it however I preferred and add comments for each column in the index indicating what stored procedures it was intended to benefit. When it compared the file on disk (repository) to the database, it would consider the two to be identical even though the version in the database was formatted differently and had no comments.

With Toad, if I modify the script in the repository with a formatted CREATE INDEX statement and check it in and also run it in the database, the table is categorized as "Merge" in the Perspective tab and the "Show changes" view seem to be doing a character by character comparison rather than a logical one.

Is there any way to achieve my goal using Toad? Keep in mind that I may want to have a different comment on each column in the index. (Sadly, SQL Server doesn't support extended properties on columns in an index, just the one unformatted text item for the entire index. Otherwise that might have been an acceptable workaround.)

Hi Mark,

We have discussed this. We also sadly that SQL Server doesn’t support the extended properties on column in index. To unformatted text item for the index, it seems maybe will have risk and it also need change a lot. So we may not support this in near future.

Kelly

SSDT seems to tokenize the CREATE INDEX in the repository and compares it functionally to what is in the database instead of doing a simple text compare. I can see where implementing that would be a significant amount of work.

It makes me sad when paid tools have less functionality than free ones.

Hi Mark,

So sorry for your inconvenience. We may not change create index auto format, but we can try to add a option to ignore the comment and space when doing compare. We have story TSS-1230 for this.

Kelly

Ignoring whitespace and comments would likely resolve my problem.

Thanks!

On Dec 16, 2015 9:08 PM, "Kelly.Chen" bounce-KellyChen@toadworld.com wrote:

RE: Index formatting in script confuses comparisons for version control

Reply by Kelly.Chen
Hi Mark,

So sorry for your inconvenience. We may not change create index auto format, but we can add a option to ignore the comment and space when doing compare. We have story TSS-1230 for this. Do you think this is acceptable?

Kelly

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad for SQL Server - General notifications altogether.

Toad for SQL Server - Discussion Forum

Flag this post as spam/abuse.

Hi Mark,

This issue still in 6.7. We add it into 6.8 fix plan.

Thanks,

Kelly

Thanks!

Mark Freeman
Database Administrator | R****ogue Fitness
1080 Steelwood Road, Columbus, OH 43212
MFreeman@RogueFitness.com

On Tue, Jan 5, 2016 at 3:39 AM, Kelly.Chen bounce-KellyChen@toadworld.com wrote:

RE: Index formatting in script confuses comparisons for version control

Reply by Kelly.Chen
Hi Mark,

This issue still in 6.7. We add it into 6.8 fix plan.

Thanks,

Kelly

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad for SQL Server - General notifications altogether.

Toad for SQL Server - Discussion Forum

Flag this post as spam/abuse.