What are the challenges you face when working across database platforms? Take the survey
Options

Index out of bounds in the array

charleyevanscharleyevans Posts: 15
edited September 20, 2007 10:07AM in SQL Compare Previous Versions
Hello,

I am running into an error in the trial version of Compare v6 and our fully licensed v5. From what I can gather we run into this error due to the length of the strings in our SQL CLR Assemblies. I had read that this should be fixed in v6, but it isn't. Is there a way to force Compare to ignore all SQL CLR assemblies, short of dropping and recreating the assemblies between comparisons?

Is there any known fix or work around that doesn't require a change in our database?

Any help is greatly appreciated.
Thanks,

Charles Evans

Comments

  • Options
    Michelle TMichelle T Posts: 566 Gold 1
    Is this error occurring when you register the databases or when you attempt to synchronize them? If it's the latter, then filtering out Assemblies and turning on the option 'Do not use ALTER ASSEMBLY to change CLR objects' might help.

    If the error is occurring in a progress dialog box, we have a method of extracting the stack trace, which might shed more light on where the error is occurring - if you email me at michelle.taylor@red-gate.com I can set that up for you.

    If you can provide a database backup of the troublesome database, or schema snapshots if you can create some which reproduce the problem, that would be fantastic, but we understand that not all of our customers can provide these things.

    Unfortunately 'Index out of bounds in the array' is a very generic error message, and so it's quite hard to pin down where it might be occurring without a copy of your database to reproduce the error for ourselves - even the stack trace sometimes comes from the wrong thread, making it unreliable in pinning down the location of the error.
    Software Developer
    Redgate Software
  • Options
    I've got the same problem (since SQL Compare 5)

    In my case, I can reproduce the problem by creating an assembly for System.Web

    Script:
    ---
    CREATE ASSEMBLY [System.Drawing]
    FROM 'c:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\System.Drawing.dll'
    WITH PERMISSION_SET=UNSAFE
    GO

    CREATE ASSEMBLY [System.Web]
    FROM 'c:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\System.Web.dll'
    WITH PERMISSION_SET=UNSAFE
    GO
    ---

    If only System.Drawing is created, SQL Compare still works. After System.Web, the comparison progress window aborts with 'Index was outside the bounds of the array'

    It makes it impossible to use SQL Compare since we can't really drop and recreate all assemblies every time.

    (as for referencing System.Web from SQLServer, it's very, very bad, but it's something I inherited from the previous team and I'm stuck with it for the moment...)

    If there was a way to skip the assembly comparison, that'd be very useful.
  • Options
    I've added your information to the bug report - we're pretty sure we know what the problem is (an assumption in our code that turns out not to be true for certain assemblies like System.Web) but it'll take quite a bit of work to fix and previously we only had one customer report. Now there are two reports, the fix is a bit higher up the priority stack, but I can't give any guarantees as to when it will find its way in.
    Software Developer
    Redgate Software
Sign In or Register to comment.