sql-servervisual-studio-2015sqlclrsqlproj

Stored Procedure gets published encrypted


So I made a simple stored procedure with SQLCLR and published it to my database. There are already some SPs and they are all not encrypted, only my published SP is encrypted. I googled for hours but could not find out how to turn the encryption off. Is there a way?


Solution

  • The SQLCLR object is not encrypted. In fact, encryption is not even an option for SQLCLR objects. The issue (i.e. why SSMS and Visual Studio's SQL Server Object Explorer indicate that SQLCLR objects are encrypted) is that there is no definition of the object in sys.sql_modules (since their definition is in the Assembly and is not T-SQL):

    SELECT * FROM sys.sql_modules;