Blog Stats
  • Posts - 59
  • Articles - 0
  • Comments - 31
  • Trackbacks - 0

 

CLR Sprocs Deployment

Today I was working on hooking up some CLR sprocs  in SQL Server.  My friend Greg Low (SolidQ Australia) pointed out that even vb clr sprocs are case sensitive.

I loaded an assembly like so:

CREATE ASSEMBLY AuditingSPROCS from 'C:\Development\AuditingSPROCS.dll' WITH PERMISSION_SET = SAFE

 

Now for the fun. I had to tweak this a bit.  The items in [] below are the namespace and class name. That is followed by a . and the sproc name:

CREATE PROCEDURE SelectReportsAll AS
EXTERNAL NAME AuditingSPROCS .[Auditing.StoredProcedures.Sprocs].SelectReportsAll

And you can test it like so:

exec SelectReportsAll

And this tidbit from my good friend Andrew Brust shows how to get details of the CLR installation on SQL Server. Guess what? 2008 is using CLR with .Net 2.0. Weird.


select * from sys.dm_clr_properties


Feedback

# re: CLR Sprocs Deployment

Gravatar Great post your given information does help me a lot knowing that you have shared this information here freely. 12/12/2011 1:55 AM | SBT Japan

# re: CLR Sprocs Deployment

Gravatar Thanks for sharing that great info, it helped me very much with my current work. 1/4/2012 3:40 PM | custom software

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

 

 

Copyright © xamlnotes