When SQL Server 2012 is installed, it includes
Microsoft.SqlServer.Server, the assembly that contains the attributes and other classes needed for SQLCLR (the common acronym for managed code running in SQL Server) programming.
The first step in working with SQLCLR is to enable this feature in SQL Server.
Before you can work with managed database objects, you need to execute the following T-SQL commands in the context of the
sp_configure 'clr enabled', 1RECONFIGUREgo
This step is necessary because SQL Server comes with managed code execution turned off by default.
At this point, you’re ready to create your first SQLCLR project ...