Error With Assemblies

BRiveraBRivera Posts: 3
edited April 16, 2007 5:35AM in SQL Toolkit Previous Versions
Ok, I am having a problem with CLR Assemblies.

I had wondered if CLR's would be a problem with syncronization but I never thought they would be complete show stopper.

I have read some of the items on this forum and figure there isn't going to be a solution for updating my CLR's, but please tell me how do you get it to stop trying to update the CLR's. I will figure out another way to deal with the CLR's, I just want it to Syncronize everything else.

:?: Here is my problem. I have done everything I can think of, but I can't get it to stop scripting to alter the assemblies.

I am using Visual Basic and I have tried the following code, but selecting or not selecting doesn't have any effect.

Start

For Each difDB As Engine.Difference In dfsCompare
'Select so it is included in the synchronization
If difDB.Type = Engine.DifferenceType.Different Or difDB.Type = Engine.DifferenceType.OnlyIn2 Then
If difDB.DatabaseObjectType <> Engine.ObjectType.Assembly Then
difDB.Selected = True
End If
End If
Next

End


I tried using the "Engine.Options.UseClrUdtToStringForClrMigration", but that just cause me to get a different error with assemblies.

:?: Please tell me how I can get it to ignore the Assemblies.


By the way, if your interested, below are the errors I keep getting.

Start
Without the "Engine.Options.UseClrUdtToStringForClrMigration" option:

"ALTER ASSEMBLY failed because assembly 'MMSQLServer' has more then one file associated with it. Use ALTER ASSEMBLY DROP FILE to remove extra files."
End

Start
With the "Engine.Options.UseClrUdtToStringForClrMigration" option:

"DROP ASSEMBLY failed because 'MMSQLServer' is referenced by object 'sp_CLR_ConstituentFilter'."
End

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Hello,

    I'm sorry that you've run into a hitch with multiple-file assemblies, and we are looking into a workaround currently.

    There are some known issues with them, normally you would get one of those 'index out of the bounds of the array' errors.

    I'll try to come up wth something on Monday.
  • I figured a way around the problem, but I still don't understand why I could not get it to ignore CLR assemblies. I could get it to ignore them if I used the UI.


    Anyway, my work-around is this:

    1. Since I know what my dependencies are within my stored procedures, I delete the stored procedures my self first in the correct order.

    2. I then also delete the assembly.

    3. At this point I run the compare and synchronize code. Since my stored procedures and assembly no longer exist, it just puts them back without any errors. Seems to be working great now.


    By the way, I want to share something that is sort of off topic. It is just an FYI and not necessarily requiring any feedback.

    I needed also to have a data compare as well. Since your program does not facilitate any sort of snapshot of data, I had to come up with a solution of my own. This is mainly because the update is client based and there is no easy way to compare 2 live databases.

    My solution:

    1. I created XML snapshots of the data in my tables.
    2. I then proceed to compare the tables that I am concerned with by joining them to my snapshot using the “OPENXML” SQL statement.
    3. I then update, delete, and add accordingly.

    This was quite a task because it was all done in code individually for each table. I would have preferred using your product if it had some sort of data snapshot capability.

    I am glad I was able to synchronize the database structure with your product, though. We do updates quite often because we are in beta testing.

    Thanks,
    Bernie
  • Is there any news on a fix for this?
  • Brian DonahueBrian Donahue Posts: 6,590 New member
    I had logged this as a bug last August, and it appears to be fixed internally. A fix for this will definitely appear in version 6, provided that the cause of the problem is the same as the original bug.
Sign In or Register to comment.