When trying to open stored procedure or other object with Sql Server Management Studio you get the error "Sql Server script failed for storedProcedure property TextHeader is not available for storedProcedure. This property may not exists for this object, or may not be retrievable due insufficient access rights. The text is encrypted"
You are trying to do that by right click on the stored procedure -> "Script Stored Procedure as" -> "CREATE To" -> "New Query Editor Window"
SOLUTION:
The stored procedure is not encrypted, the error is because there is no grant permission "VIEW DEFINITION"
Right click on the database -> properties -> permissions. Choose the relevant users or roles, go to the bottom of the permissions "Explicit " tab. There you can see the "View definition" permission. You should grant it.
If you find this solution useful, you are welcome to press one of the ads in this page.. Thanks!