SQLTeam.com | Weblogs | Forums

Accessing stored procedures


I have an MSSQL Server 2014 Essentials installed, with Management Studio and SDK.
I imported a database from an older project that contains stored procedures. I need to know what exactly these procedures do, but I can't seem to access them. When I try, there is an error message:

The TextHeader property is not available for StoredProcedure '[dbo].[ProcedureName]'. This property does not exist for this Object or may not be accessible due to insufficient permissions. The text is encrypted (Microsoft.SqlServer.Smo).

I am logged in as SA.
Is there any way to access the procedures?


They are most probably encrypted, you will need to decrypt to remove padlock icon.


There are third party applications - Red Gate for instance - that will let you view encrypted stored procedures. Alternatively, you can use DAC - see an article here: http://sqlmag.com/database-security/decrypt-sql-server-objects It is a bit dated, but I think it is still accurate.