Index out of bounds in the array
charleyevans
Posts: 15
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.
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
Charles Evans
Comments
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.
Redgate Software
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.
Redgate Software