Step by Step -How to use CLR Assemblies | MS SQL Server
HTML-код
- Опубликовано: 21 фев 2015
- Database professionals are often uncomfortable when dealing with CLR assemblies. In this step by step guide on creating and using CLR assemblies we cover how to go about creating and deploying .Net assemblies in Microsoft SQL server. Database administrators often discourage the use of CLR assemblies because they have no visibility on the underlying code. and while this makes sense it is often a limitation that needs to be overcome to avoid writing tons of lines of code unnecessarily within the stored procedure. A well written CLR assembly can significantly improve query performance however it is important to understand that it is a double edge sword.
Need more information?
Visit www.enabledbusinesssolutions.com
To know more about Jayanth Kurup visit www.jayanthkurup.com
Jayanth is a Microsoft SQL Server trainer / consultant with over 15 years experience. He has worked with companies like Microsoft, IBM, HCL , Wipro , WellFargo , Zeomega and many more. He is based out of Bangalore and a very active member of the SQL Server Community.
In this channel he covers complex topics related MS SQL Server , PowerBI , Azure , AWS , Powershell, SSIS , SSAS , SSRS , Machine Learning , AI , etc
You can also reach Jayanth via his LinkedIn profile below
www.linkedin.com/in/jayanth-k...
...and that's how I learned how to use C# in Sql Server. Tested, works as it says on the tin. Thanks very much.
Excellent simple example for introduction to the Assemblies in SQL Server - useful 10 minutes of your time.
Concise and well-explained. Suggestion: In the future, ensure volume level is set to 50% (had to really turn up my speakers to hear ya) and make your mouse movements slow and deliberate to help your students follow your actions easier. Well done!
Thanks for the tip!
Simple and complete. Contribution helpful. I never imagined it would be so easy and with C#.
Thank you.
Thank you Jose , Appreciate it
José Ramírez thanks for watching glad you liked it
Very nice video! Great for people who don't have any exposure to CLR. Thank you!
+stpieraf Thanks stpieraf
good example and explanation
Great video. Jayanth is great.
Thanks. Nice video concise and direct to the point.
Glad it was helpful!
Thank you Jayanth. Very helpful!
You're welcome Tim. Thank you for watching the video !!
dear Jayanth Kurup thanks for your beneficial video, can you leave the SQL query you wrote in the video somewhere so I can copy it?
Thank you, it was a very simple, easy to understand video :)
Nerusha Moodley thank you..glad you liked it
This was a very good introduction. How would I debug such an assembly in Visual Studio? Specially when the assembly code queries tables in the database? What is the precondition?
Capitano Americo debugging the assembly would require access to to source code. If the assembly is called within a function you can open the function in visual studio or ssms and use the options under debug menu options.
Hi Jayanth, I have a database project which is in clould at client place. I need to write a CLR function/procedure to do write to file operation and call it from sql function or proedure.
Can you give some example for above implemantion.
I appricate your current vedio on how to use CLR function.
+chandra shekar Hi Chandra , which cloud hosting provider are you using ? Also are you using a VM or the PaaS Databases, Write to file requires access to either Filesystem or S3 bucket or cloud storage the way to code would changed based on the hosting provider and the type of storage. if you are using a VM then you can code just like on your local system using system.IO else you might need to use API calls from the provider
hello...my function in c# use Excel = Microsoft.Office.Interop.Excel;. when I create the assemebly and excect the function I get the error 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
could you do an example where in the c# class you use the excel library and create the assembly in sqlserver?
Thank you
Mauricio Roldán Ramírez sure !!