O'Reilly logo

Microsoft® SQL Server 2012 Unleashed by Alex T. Silverstein, Chris Gallelli, Paul T. Bertucci, Ray Rankins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required