开发者

how to deploy the CLR functions in SQL server 2008

开发者 https://www.devze.com 2022-12-18 01:39 出处:网络
I created a SQL Server Project in VS2008 called \'RegularExpression\'.In that Project i created a \'Regex.cs\' class and i wrote one 开发者_运维知识库function regarding Regular Expression.

I created a SQL Server Project in VS2008 called 'RegularExpression'.In that Project i created a 'Regex.cs' class and i wrote one 开发者_运维知识库function regarding Regular Expression.

Then i Build the solution.

Now My problem is to deploy this solution in SQL server 2008 through scripts.( not just clicking on Deploy in VS2008 ).

I succeeded up to deploy the assmebly of that project in SQL 2008 using CREATE ASSEMBLY <AName> FROM '<path of .dll>'

but iam not getting that function i wrote in VS2008 in SQL 2008 Function section.


CREATE ASSEMBLY [RegularExpression]
AUTHORIZATION [dbo]
FROM < DLL Path > 
WITH PERMISSION_SET = SAFE
GO

/****** Object:  UserDefinedFunction [dbo].[Regex]    Script Date: 01/23/2010 15:08:01 ******/
CREATE FUNCTION [dbo].[Regex](@Pattern [nvarchar](2000), @Input [nvarchar](2000))
RETURNS [bit] WITH EXECUTE AS CALLER
AS 
EXTERNAL NAME [RegularExpression].[UserDefinedFunctions].[Regex]
GO

http://www.setfocus.com/technicalarticles/clrfunctionforsqlserver_2.aspx

The above links helped a lot

0

精彩评论

暂无评论...
验证码 换一张
取 消