Options

How do I ignore warning about the column orders

pwoonpwoon Posts: 18
Hello,
We want to ignore the errors or warnings where the column ordering is not the same between two different databases. What is the best way to do this. In the Options in the CompareWith method, I don't have ForceColumnOrder as an option.

Thanks
Phillip

Comments

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Phillip,

    I'm pretty sure that if you're seeing table rebuilds in your synchronization script, it could be because you need to specify the options in two different places. First, on the CompareWith method, and later in the BuildFromDifferences method. So it's possible you have the comparison done with one set of options, and the script being generated with another set of options. Could this be the issue?
  • Options
    Hi Brian,
    While it is true that our Options need to be the same between CompareWith and BuildFromDifference (they're not), we don't speciffy Options.ForceColumnOrder in either. And the differences and the build script catches the colum order differences. The SQL Compare program doesn't flag these differences if I don't have "Force Colum Order" option checked. As soon as I check it, SQL Compare gives me the save differences as the program.
  • Options
    pwoon wrote:
    Hi Brian,
    While it is true that our Options need to be the same between CompareWith and BuildFromDifference (they're not), we don't speciffy Options.ForceColumnOrder in either. And the differences and the build script catches the colum order differences. The SQL Compare program doesn't flag these differences if I don't have "Force Colum Order" option checked. As soon as I check it, SQL Compare gives me the save differences as the program.

    Hi,

    the warning is raised during the CompareWith phase. The warning about column order difference ("The column order in table ... has changed. The table must be rebuilt. The data in the table will be preserved.") is raised only if the ForceColumnOrder option is set. Could you please doublecheck that the option sent has this disabled?

    Alternatively, since version 5 we have a message ID for every warning. (documentation updete will follow). For every warning we set a severity level (these you can see in the version 5 UI), and we include a token that identifies the warning/message type. If you would like to filter out certain warnings, you can do so by filtering them based on this property. The property is MessageTypeID, and the token for the above warning message is "TableRebuildDueColumnOrderChange".

    Hope this helps,

    Andras
    András Belokosztolszki, PhD
    Red Gate Software Ltd.
  • Options
    Hello,
    When you say: "disabled", do you mean have "Not Options.ForceColumOrder" Or'd with the other options, or just not included in the list? I don't have it included in the list.
  • Options
    Hi Andras
    How do I get access to the MessageTypeId from the Difference Object?

    Thanks
    Phillip
  • Options
    Okay,
    The messageTypeID data member is in the Messages member of the Work class. But it only shows up only in the Warnings collection. In the messages collection, I get difference messages, like "dropping indexes", etc, for , I assume, rebuilding the table with the correct column order. How do I ignore those messages? Also, in the differences object, the table names that have the columns out of order shows up and I have no way of knowing what kind of difference it is to ignore it.
  • Options
    Hello,
    Is there any news about the column ordering issue? What I mean is: can anyone reproduce the issue where the ForceColumnOrder option is not set, but yet the toolkit is flagging out of order column orders as a difference? Subsequently the SQL to fix the error has a lot of statements to rectify these differences.

    If anyone has reproduced this issue, will there be a fix for it, or is it just me that it's happening to?

    Thanks
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    What are the options, both in the CompareWith method and the BuildFromDifferences? If one of the options is forcecolumnorder, then SQL Compare's engine is considering the column order. If this is not one of the options, then it is not set.
  • Options
    Hi,
    We don't have the ForceColumnOrder option, but we still get the difference. Our only option so far is to perhaps make sure that all column orders are the same (by running the scripts to fix them), but we would prefer not to since we have 600 sites that might theoreticall have columns out of order.

    I was just wondering if anyone has encountered this problem where the column orders were different, and the ForceColumn order option IS NOT SET, but the engine is still flagging these differences. If this is just us, then we'll have to take other actions.

    Thanks
  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello,

    So far, this is the only occurrance of this and I can't reproduce it. Are you sure there is no other difference? Have you double-checked this with the UI version of SQL Compare?
  • Options
    Hello,
    We decided to use C# (Still in Delphi 2006 which supports C#, pascal and C++), and it works. Apparently there is an issue with the options and Delphi; don't know. Anyway, thanks for your help.


    Phillip
Sign In or Register to comment.