Best Practices for SQL CLR Usage
Before we close this chapter, we’d like to summarize certain best practices for the appropriate use of SQL CLR programming.
The CLR integration in SQL Server 2012 is a powerful technology. In some cases, it allows you to do things you can’t do practically in T-SQL (such as apply complex computational logic in stored procedures or triggers), and in other cases, it allows you to do things you can’t do at all in T-SQL (such as create your own aggregate functions).
The fact remains, however, that set-based data selection and modification is much better handled by the declarative constructs in T-SQL than in the procedural constructs of .NET and the ADO.NET object model. SQL CLR functionality should be reserved for specific ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access