Solved

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

Posted on 2014-10-27
5
109 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 39

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 39

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Code works but how can I download the file? 20 45
Chat Room 1 25
SQl query 19 12
index Out OF Range Exception error 4 28
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.
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

707 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

12 Experts available now in Live!

Get 1:1 Help Now