Hi All,
I need to find an efficient way to deal with assemblies. The number of these assemblies can grow considerably large (around 2000) in future. I can easily put can assembly in the GAC for web. But we have a desktop application too. So we don't want to create the maintainance overhead of register/ un-register assemblies and dealing with different versions etc. on users machine. I was wondering if there is a way where we can store these assemblies in the database. And load it back in to the memory and cast it back to a custom object. That way it will be relatively easier to maintain in future.
Any ideas..?
Thanks.
Loading
SenthilkumarPosted May 25, 2012, 12:08 AM
In sql server 2005 onwards, you have an opportunity to register the .NET CLR assembly in your sql server database.
You can register the assembly as dll using the create assembly assembly.
CREATE ASSEMBLY ASSEMBLY_Name
FROM Path
You need to make sure that you have enabled the clr enabled on your sql server.
you can check it by SELECT * FROM SYS.CONFIGURATIONS.
If it is not enabled then you the following.
sp_configure 'clr enabled', 1
Hope this will help you.
Jignesh TrivediPosted May 24, 2012, 11:56 PM
I don't think that you can store whole assembly in DB.
Please refer below link I think it related to u.
http://social.msdn.microsoft.com/Forums/is/netfxremoting/thread/4b6afa62-8242-4c03-928a-c64461fd9b06
But As my knowledge, GAC is good idea to store globle assembly.
I think Assembly Binding will help you.
http://nbaked.wordpress.com/2010/03/28/gac-alternative/
http://msdn.microsoft.com/en-us/library/0ash1ksb.aspx
http://msdn.microsoft.com/en-us/library/twy1dw1e.aspx
hope this help.
Vikrant MorePosted May 24, 2012, 3:08 PM
the following article is biased on CLR in SQL SERVER 2008
http://www.simple-talk.com/sql/t-sql-programming/practical-sql-server-2005-clr-assemblies/
Thanks!