One of our in-house applications has a SQLCLR assembly which is currently experiencing problems. The developer is having problems recreating the issue using the version that is stored in our source control system, so he suspects that some code may have been released that was not uploaded to source control. Is there a way to extract a SQLCLR assembly into a .dll file so that he can reverse engineer it for analysis?
There is indeed a way - the assemblies are stored in the
sys.assembly_files
table in your database. Select everything fromsys.assembly_files
and find theassembly_id
, then run the following code (changing theassembly_id
andSaveToFile
path first):In order for this to work though, you will need to enable the OLE Automation feature in Surface Area Configuration for Features on your SQL instance.
I pulled this code from here:
http://social.msdn.microsoft.com/Forums/en/sqlnetfx/thread/1e00e656-f322-45ec-b4e0-83db748fa97a