开发者

Is it possible to decompile a SQL Server CLR stored procedure assembly?

We've got a few internal proprietary database CLR stored procs (MSSQL 2005) that were put together by a former employee who misplaced (and never checked in) the .NET source code used to build the assemblies. These were not obfuscated.

Is it possible to reverse-engineer the assemblies to a state where we could edit the source and re开发者_JAVA技巧compile?


Yes, as long as you have the assembly and it hasn't been obtusified in any way.

.NET Reflector should work for you:

http://www.red-gate.com/products/reflector/


There are a couple of suggestions here:

Best (free?) decompiler for C# with Visual Studio integration?

Don't forget that you can also use SQL Server profiler to trap the SQL statements.


Once you have the Assembly extracted into a DLL, you can use the open-source ILSpy to decompile it. You won't be able to see all of the compiler options used when compiling it, nor will you be able to see how the source code was broken out into separate files. Still, you will see enough to be able to create a Visual Studio project, create the Properties\AssemblyInfo.cs file, add the references, etc. so that you can properly add it so source control and then start editing it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜