Database Reference
In-Depth Information
Listing 20-2. Deploying the Assembly into SQL Server
Create Assembly SQLCLR_StoredProcedure
From
--change this path to reflect your database assebmly location
'C:\VidyaVrat\C#2012 and SQL 2012\Chapter20\Code\Chapter20\bin\Debug\Chapter20.dll'
WITH PERMISSION_SET = UNSAFE
GO
CREATE PROCEDURE dbo.InsertCurrency_CS
(
@currCode nvarchar(3),
@currName nvarchar(50)
)
AS EXTERNAL NAME SQLCLR_StoredProcedure.StoredProcedures.InsertCurrency_CS;
4. Once code is added, click Execute or press F5. This should execute the
command successfully. Then go to the Object Browser, select SQL2012DB,
right-click, and choose Refresh. This will show the objects under
Programmability and Assemblies in the Object Browser, as shown in
Figure 20-7.
Figure 20-7. Deploying assemblies and showing objects in Object Browser in SQL Server
 
Search WWH ::




Custom Search