Sql-server – How to view an encrypted view or stored procedure

sql serversql-server-2008sql-server-2012

I am working on a third party database.

When I try to view the definition of a view by right clicking, CREATE TO and then to NEW QUERY EDIT WINDOW, I am getting an error:

This property may not exist for this object or may not be retrievable
due to insufficient access rights. The text is encrypted.

Best Answer

Another third party tool you could use to decrypt encryted objects on the fly is Red Gate's SQL Prompt: http://www.red-gate.com/products/sql-development/sql-prompt/features

Hovering over the stored procedure will then allow you to see the decrypted creation script.

Disclaimers: this tool is commercial (with a 14 day free trial) and I work for Red Gate.