Creating CLR Procedures and Assembly in SQL Server using Visual Studio

  • I had a requirement of creating CLR procedures in SQL Server using Visual Studio.. Problem here is that for executing these CLR procedures I need to create an Assembly with Permission Set as UNSAFE but if I am creating the Assembly with that then I am unable to access the application for all the user who dont have admin permissions........ Can any one help me out in this??????????

  • Why do you need to create it with UNSAFE? What is it doing that is causing you to require that setting?

    Also, just because its created with UNSAFE does not mean that you cannot prevent unauthorized users from being able to execute the proc.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • Thanks for the Reply..... Here is the reason why I am going for the UNSAFE setting

    As per my requirement I need to call a normal SQL server stored procedure through a JOB, this stored procedure will call a CLR Stored Procedure created through VISUAL STUDIO which will process some steps inside and calls another CLR procedure for multithreading concept, the purpose of 2nd CLR Procedure is to call 3 different stored procedures parallely to calculate different operations......... During this process of creating CLR Stored Procedure there is an issue throwing some error.... and if I set the setting to UNSAFE then it is creating an Assembly in SQL Server Management Studio which is used to call the threading concept. Please revert for any information......

    Once again thanks Bud

  • pandu.72 (7/3/2011)


    Thanks for the Reply..... Here is the reason why I am going for the UNSAFE setting

    As per my requirement I need to call a normal SQL server stored procedure through a JOB, this stored procedure will call a CLR Stored Procedure created through VISUAL STUDIO which will process some steps inside and calls another CLR procedure for multithreading concept, the purpose of 2nd CLR Procedure is to call 3 different stored procedures parallely to calculate different operations......... During this process of creating CLR Stored Procedure there is an issue throwing some error.... and if I set the setting to UNSAFE then it is creating an Assembly in SQL Server Management Studio which is used to call the threading concept. Please revert for any information......

    Once again thanks Bud

    Consider refactoring your code away from using multiple threads within a SQLCLR. Why is a Console App not an option?

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply