Solved

What are the disadvantges in executing .net assembly in SQL Server ?

Posted on 2014-10-27
5
114 Views
Last Modified: 2014-11-25
Is it a good practice to execute the .net  assembly through SQL server ?
0
Comment
Question by:Varshini S
  • 2
  • 2
5 Comments
 
LVL 40

Assisted Solution

by:Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger) earned 125 total points
ID: 40407210
They are slower than straight SQL.

Their role is not to replace SQL, they are there to provide a way to perform operations that cannot be done or are hard to do from SQL, such as Office interop.
0
 
LVL 40

Assisted Solution

by:Kyle Abrahams
Kyle Abrahams earned 125 total points
ID: 40407373
Also it depends on if you own the DLL or not.  If you don't own the DLL (eg: you didn't compile the source to generate that DLL) you're trusting the user who provided the DLL that it's going to do what they say it will do.

There are ways around that (eg: de-compiling to verify) but it's a disadvantage in my mind.

Also to elaborate on why they are slower the DB has to load the dll into memory, then invoke the function in the CLR.  It also doesn't perform any kind of performance tuning or optimizations.

Lastly RAM usage could be another disadvantage (eg: the assembly will take up RAM space).
0
 
LVL 69

Assisted Solution

by:Éric Moreau
Éric Moreau earned 250 total points
ID: 40408120
0
 
LVL 40

Expert Comment

by:Kyle Abrahams
ID: 40412016
Eric . . . where do you cover the advantages / disadvantages?
0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 250 total points
ID: 40412284
I don't have a section specific for pros/cons. I warn that SQL statements will always be faster then your CLR code.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Solution for warm standby SQL server 20 41
Visual Studio TFS - how do I check in my code? 2 30
Help with C#, MVC, razor. 6 23
Windows Media Player 2 18
In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now