Add a menu option to decrypt stored procedures
It would be useful to add an option to decrypt encrypted stored procedures and display the decrypted SQL in a query tab.
We often work with encrypted SP's on customer databases, but when there is a bug report, it is often hard to see what is going wrong.

Hi Dirk,
This is already available in the latest SQL Prompt. It’s on by default but just to double check it’s enabled for you, there’s a checkbox at the bottom of the behavior page in the options named “Decrypt encrypted objects”.
Thanks,
Aaron.
-
Roland Andrag commented
Found the way to decrypt a trigger - type a script referring to the trigger, e.g. Alter trigger [trigger name] and then right click and script as alter.
-
Roland Andrag commented
Is there any way to use SQL prompt to decrypt an encrypted trigger?
-
Anonymous commented
when I right click on the encrypted Store procedure on programmability tree , I can not see 'modify decrypted'.
this is while I checked the Decrypt encrypted object from SQL Prompt menu\Option\Behavior -
Mike commented
I do not see the option "Decrypt encrypted objects" in sql prompt.
-
Dirk Vansina commented
Hi Aaron,
There is indeed an option to view the decrypted SQL code by hoovering over the object in the query window (and clicking on the tooltip to copy the SQL code).
But it would be nice to do this directly from the programmability-tree on the left side.
Now, the option 'modify' is disabled is you right click on an encrypted object.Possible workflow: right-click on an encrypted object in the programmability tree, select a new menu option 'modify decrypted', display the decrypted code directly in a new query window.