No, there is no other way then using SQL Server encryption as build-in function for T-SQL.
An option could be using .NET CLR assembly, but that means a lot of work and plain T-SQL is more performant.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi All,
I want to do store procedure encryption with password, basically want to hide the logic behind the procedures...
Is there any way around for Procedure encryption with password or any other type of decryption.
No, there is no other way then using SQL Server encryption as build-in function for T-SQL.
An option could be using .NET CLR assembly, but that means a lot of work and plain T-SQL is more performant.
If you want to hide the logic in the procedure, you need to avoid that users get permission to read the procedure code. To do this, you cannot permit installation at a customer site, but you need to host the procedure yourself, for instance in Azure SQL DB.
To be able to execute the stored procedure, SQL Server needs to read the code for the procedure. So if the procedure would be encrypted, SQL Server must be able to decrypt it. But if the decryption key is present on the machine, anyone with sufficient permission can access that key. So that is why the feature cannot be implemented.