


You can also view it in SQL Server Object Explorer. Once the project is succsefully published you can see the script which has created the assembly and stored procedure by clicking on the View Script inside Data Tools Operations pane. Specify the target connection string and click Publish button and you will see the logs on Data Tools Operations pane. To do so, let's build the application and then right click on project in Solution Explorer and select the Publish. In Visual Studio, you can simply select the Deploy option, which takes care of both creating the SQL Server Assembly as well as creating the target database object. SqlP.Send("This is a first stored procedure using CLR database object") The following example shows a simple CLR stored procedure that returns a text message.

Select the SQL CLR C# from the list on the left pane, and choose SQL CLR C# Stored Procedure in the middle pane.Īfter selecting an entity type, a class template for that type will be added to your project and opened in the code editor window. Select Project > Add New Item menu option. Once the project is created, you can add a CLR entity to your project from the Add New Item dialog box. menu option and then select the SQL Server Database Project template. To create a CLR database objects in Visual Studio, first select the File > New > Project.

The most productive way of creating CLR database objects is to use Visual Studio which provides tools that can help you to create CLR database objects as well as deploy and debug them.
