SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Simple SQL CLR Integration


Simple SQL CLR Integration

Author
Message
Adam Machanic
Adam Machanic
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1555 Visits: 714
Not a whole lot. I think 5% is a very accurate figure for the current implementation. However, if MS changes a few things about the way UDTs and UDAs work in the next version, I think that number could jump quite a bit.

I also predict that in a future version MS will implement a fully object-based data access library that can compete with TSQL from a performance point of view. Note, I have no inside information to back that up, it's just what I think I see based on some of the direction I see all of this going in. If that does turn out to be true, I think we'll see the landscape drastically change as developers really will no longer have a huge incentive to learn T-SQL. But that's at least a few years off.

--
Adam Machanic
SQL Server MVP
SQLblog.com: THE SQL Server Blog Spot on the Web
Adam Machanic
Adam Machanic
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1555 Visits: 714
The assembly is loaded into the database. The DLL is no longer used -- and can even be deleted.

You are correct, there can be many issues, and it is not an easy task. Not so bad for functions and stored procedures most of the time, but quite interesting for user-defined types...

--
Adam Machanic
SQL Server MVP
SQLblog.com: THE SQL Server Blog Spot on the Web
Undebtedly
Undebtedly
SSC-Enthusiastic
SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)

Group: General Forum Members
Points: 188 Visits: 13
This is the first I've been able to stop and look at this. Is it me, or is this CLR integration a lot like our current extended stored procedure capability?



Steve Miller
dougjjj
dougjjj
Mr or Mrs. 500
Mr or Mrs. 500 (539 reputation)Mr or Mrs. 500 (539 reputation)Mr or Mrs. 500 (539 reputation)Mr or Mrs. 500 (539 reputation)Mr or Mrs. 500 (539 reputation)Mr or Mrs. 500 (539 reputation)Mr or Mrs. 500 (539 reputation)Mr or Mrs. 500 (539 reputation)

Group: General Forum Members
Points: 539 Visits: 644

Yep that sounds about right to me, except it seems a bit simpler to use. Anyway I'm convinced of its benefits, not something I'd use that often but when it's used it seems like it would be of great use.





Adam Machanic
Adam Machanic
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1555 Visits: 714
Similar, perhaps, with several key differences:

1) Managed code vs. unmanaged code -- means that CLR routines are safer than XPs.
2) XPs are created per server. CLR routines are created per database.
3) XPs are only "procedures". CLR routines can take the form of procedures, functions, types, aggregates, or triggers.
4) In-process ADO.NET context connection for CLR routines vs. "bound" connections for XPs -- means less overhead for CLR routines (no need to create a new connection).

--
Adam Machanic
SQL Server MVP
SQLblog.com: THE SQL Server Blog Spot on the Web
Undebtedly
Undebtedly
SSC-Enthusiastic
SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)

Group: General Forum Members
Points: 188 Visits: 13
Adam, thanks for the succinct summary.



Steve Miller
William (Bill) Vaughn
William (Bill) Vaughn
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 8

I think the article is fine, but it seems to ignore the Visual Studio 2005 tools that can make the process of creating and debugging SQL CLR exectuables far easier.




HTH,

William (Bill) Vaughn
Author, Mentor, Consultant, Microsoft MVP
betav.com
F. Donald White, Jr
F. Donald White, Jr
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 8

Excellent article!!! I am new to SQL Server and am charged with moving a MS Access application to SQL. I have managed to get all our business rules translated to the point all MS Access is used for is a "front end" consisting only of a database full of forms. Part of our application requires the output of reports in an Excel format. A resonably easy task in VBA. I have been struggling on how to accomplish this in SQL Server 2005. Since I am able to create the customm reports using VB.NET or C# .Net, this article gave me the link I desparately was searching for!

My Kudos to the author!


tyson.price
tyson.price
SSC-Enthusiastic
SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)SSC-Enthusiastic (161 reputation)

Group: General Forum Members
Points: 161 Visits: 642
Best example I have seen on the web. It actually works if you follow the steps.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search