Developing Managed Stored Procedures
Stored procedures are a great starting point for getting into SQLCLR because they are easy to implement. A partial class of that name opens in the SSDT code window. Note that SSDT automatically adds the required reference to Microsoft.SqlServer.Server, System.Data, and System,
and their associated using
statements. Microsoft.SqlServer.Server
contains the SqlProcedure
attribute required for turning ordinary methods into SQLCLR stored procedures.
Next, you create your first managed SQL Server object, a stored procedure written in C#. Use the Add New Item context menu by right-clicking your project name in Solution Explorer, then clicking SQL CLR C#, and then clicking SQL CLR C# Stored Procedure. Name the object ...
Get Microsoft® SQL Server 2012 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.