Add server-side compilation ability to SQL CLR
The current model in which a developer generates an assembly and then passes it to a DBA and says "trust me" is failing to allow for the typical dynamics involved. To the DBA, this assembly is like a black box.
Also, the current model ties databases directly to versions of the .NET Framework. While there is currently only a single supported version of this now, this won't remain the case and will lead to a versioning mess in the future. DBA's won't want to hear about things like publisher policies, etc. or whatever will be required to deal with it.
Further, the current model requires a DBA to be comfortable with Visual Studio, even when implementing what would otherwise be simple managed code functions. This is harming SQL CLR adoption.
If the managed code source was processed when scripting a database instead of the assembly binaries, much of these issues would be avoided.
Upvotes: 76<=-=Mar 25 2007 8:51PM=-=>
The one remaining issue would be how to implement assembly references. I think that the default assembly could already have the references that are the default ones when you currently start a database project in Visual Studio. Other references required by the function (or procedure or type, etc.) could be passed like this:
CREATE FUNCTION somefunction AS CLRCOMPILE
alternately, something like:
ALTER ASSEMBLY default ADD REFERENCE ‘reference goes here’<=-=Aug 20 2007 2:34PM=-=>
First of all i would like to thank you for the detailed feedback and articulating the need for this feature. We have heard several requests on this in the past and we are looking at it closely and will try to enable it in a future release.
SQL Server Engine
See also “Write Routines Directly in .NET Languages” (https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=318327), which is the same thing with a different suggested syntax.<=-=Nov 1 2011 1:33PM=-=>
This will make life so much easier it’s tough to explain. Working with 11 server trying to keep clr libraries in synch, half the time things are smooth the other half makes me think if it was worth it.
Not needing to deploy assembly will be awesome.
I too want this. There is another post asking for this ability in another way here: https://connect.microsoft.com/SQLServer/feedback/details/318327/write-routines-directly-in-net-languages
Please see my comments there.
Yep. Highly wanted. But 10 years from the report…