7

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.

1
  • Assemblies can be stored as byte arrays within the database. which requires no further deployment effort. I believe this is the default, though others can probably provide more detail. Commented Jan 23, 2010 at 7:30

1 Answer 1

16
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

Sign up to request clarification or add additional context in comments.

1 Comment

Re: link 'This domain has recently been listed in the marketplace at Domainnamsales.com Click here to inquire'. I wanted to upvote for the link as well :(

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.