How to add a CLR Assembly to SQL Server 2005#

  • First set the database to be compatible with CLR
EXEC sp_configure @configname = 'clr enabled', @configvalue = 1
RECONFIGURE WITH OVERRIDE
GO
  • Set database to allow unsafe assemblies required for XML Serialisation
ALTER DATABASE CREDITDB SET TRUSTWORTHY ON
  • Drop assembly if exists
DROP ASSEMBLY [xxx.XmlSerializers]
go
DROP ASSEMBLY xxx
go
  • Create assembly
CREATE ASSEMBLY xxx
FROM 'C:\xx\xx.dll'
WITH PERMISSION_SET = UNSAFE
go
CREATE ASSEMBLY [xxx.XmlSerializers]
FROM 'C:\xx\xx.dll'
WITH PERMISSION_SET = SAFE
go
  • Setup function to call assembly function
CREATE FUNCTION Bar(@Bar int) RETURNS bit 
AS EXTERNAL NAME xxx.[xxx].Bar
go
CREATE FUNCTION Foo(@Foo int) RETURNS bit 
AS EXTERNAL NAME xxx.[xxx].Foo
go

Back to SQL Server 2005

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-1) was last changed on 24-May-2017 15:30 by UnknownAuthor
G’day (anonymous guest) My Prefs
  • View Page Source
  • This clear IPSec security association,
    clear ipsec sa peer X.X.X.X
    

All Pages

Page views: 1862

Private Tomcat

Linux

MySQL

Email

SQL Server

ASP

JSP

C#

Web Mail

Windows Plesk

Linux Plesk

PHP

Gaming

ASP.NET

Persits ASPUpload

Wiki Help

Referring Pages:
...nobody

JSPWiki v2.8.1