Red Gate forums :: View topic - Altering CLR assemblies
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Comparison SDK Previous Versions
SQL Comparison SDK Previous Versions forum

Altering CLR assemblies

Search in SQL Comparison SDK Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
pil0t



Joined: 27 Apr 2009
Posts: 8

PostPosted: Mon May 25, 2009 8:27 am    Post subject: Altering CLR assemblies Reply with quote

1. I comapared two databases with different sql assemblies, and SDK generated migration script like this:

<drop depended objects>
<drop clr assembly>
<create assmbly>

Is there any way to generate migration like this:

ALTER ASSEMBLY [myAssembly]
FROM 0x4d5a9000030000000......?



2. I created "by hand" script (alter assmly ...) and execute it in sql server managment studio without any errors.

When i try to pack it in sql packager i got error
"SQL Error: ALTER ASSEMBLY for assembly 'myAssembly' failed because assembly 'myAssembly' is malformed or not a pure .NET assembly. "

3. in SQL compate 8 there is a checkbox "Do not use ALTER ASSEMBLY to change CLR objects" but when it is checked or not, i always got DROP ASSEBLY, CREATE ASSEMBLE statements.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6643

PostPosted: Thu May 28, 2009 6:06 pm    Post subject: Reply with quote

Hi,
I hope someone will point out any wrong assumptions I've made, but I have had a look at the source code for SQL Compare and it looks to me as if the assembly will be rebuilt instead of altered if:
  • a parent assembly needs to be re-created
  • The assembly metadata between the assembly in database a and database b is different
  • The assembly metadata could not be compared. In that case SQL Compare should leave a log entry stating why the metadata could not be compared.
  • Either or both assemblies contain no files or are less than 96 bytes in length
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group