By default this feature is disabled in effort to security and some performance. Next code will solve this issue:
EXEC sp_configure 'show advanced options' , '1' GO reconfigure GO EXEC sp_configure 'clr enabled' , '1' GO reconfigure -- turn back advanced options EXEC sp_configure 'show advanced options' , '0' GOAfter we can write any user-defined functions aggregates, stored procedures, etc...using high versatile and flexible .NET Framework infrastructure in C# or VB.NET.
Typically, I use this feature to accomplish goals of adding Regular Expression support in MS SQL Server. Useful article CLR Assembly RegEx Functions for SQL Server by Example is written by @Phil_Factor.
That's all for today. If you don't mind my dear reader, I will post short tips for myself from time to time, maybe you also find them useful in some cases.