Monday, 27 June 2016

How to encrypt the stored procedure in SQL server ?

In SQL server we can encrypt the stored procedure using Encryption option.If Stored procedure is encrypted we cannot get the definition using Sp_helptext option.

It is very helpful to hide the logic behind the stored procedure from the end user.
But the user who created the SP have to save the definition manually otherwise we cannot get the definition of SP.

Example

The following stored procedure is created without encryption, so it is possible to get the definition.


But the following example is created using encryption keyword. So the following message will appear if you try to get the definition using Sp_helptext.

No comments:

Post a Comment